Field understanding in the Http Request Header, http request header field

Source: Internet
Author: User

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.

Combined,
Accept: text/xml;
Content-Type: text/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.

 

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.