Field understanding in the Http Request Header, http request header field
1. Accept belongs to the request header, and Content-Type belongs to the object header.
Http headers include common headers, request headers, response headers, and object headers.
Requester's http header structure: Common header | Request Header | entity Header
Http header structure of the responder: Common header | response header | entity Header
2. Accept indicates the data type that the sender (client) wants to Accept.
For example, Accept: text/xml;
The data type that the client wants to accept is xml.
Content-Type indicates the Data Type of the object data sent by the sender (client | Server.
For example, Content-Type: text/html;
The data format sent by the sender is html.
That is, the data type to be accepted is xml, and the data format sent in this request is html.
3. Referer: Http Referer is a part of the header. When a browser sends a request to a web server, it usually carries a Referer to tell the server from which page the request is sent.
4. the Cache-Control value is divided into: max-age = xx; indicates that the cached content will expire after xx seconds. This option is only available in http1.1;
Public; all content will be cached;
Private; content is only cached in the private cache;
No-cache; no content will be cached;
Must-revalidation/proxy-revalidation; if the cache content is invalid, the request must be sent to the server/proxy for re-verification.
5. user-agent: a browser. Its information includes the hardware platform, system software, application software, and users' personal preferences.
6. accept-encoding: the browser sends the code to the server and declares the encoding type supported by the browser.
7. accept-language: indicates the language and region supported by the browser.