![]() The above is equivalent to saying "Data is encoded with gzip. Sample Response header Content-Encoding: gzip ![]() The above is equivalent to saying "I want to receive HTML in response. Note: It's important to note that headers cannot contain comments. The request header and response header containĭifferent information. Information about the message such as the type of message or the encoding of theĮxpressed as key-value pairs. Request and the server's response message are divided into two parts: header The HTTP header is used to negotiate the type of message exchange between theĬlient and the server and is used to determine access. Requester and the responder, including what information is needed to get a ![]() HTTP defines the communication rules between the How does a resource request work on the web?įigure: Illustrated client request and server responseĪ browser and a server can exchange data over the network using the Hypertext Developers have usedīut Cross-Origin Resource Sharing (CORS) fixes this in a standard way.Įnabling CORS lets the server tell the browser it's permitted to use anĪdditional origin. In other words, there are public resources that should be available forĪnyone to read, but the same-origin policy blocks that. For example, you want to retrieve JSON data from a differentĭomain or load images from another site into a element. In a modern web application, an application often wants to get resources from aĭifferent origin. This mechanism stops a malicious site from reading another site's data,īut it also prevents legitimate uses. ![]() The browser's same-origin policy blocks reading a resource from a different ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |