HTTP header information

Source: Internet
Author: User

  通常HTTP消息包括客户机向服务器的请求消息和服务器向客户机的响应消息。

After logging in to CSDN, click on a resource to see the HTTP header information:

As you can see, the header information consists of three parts:

1. General Head 2, request header 3, response header 4, query string parameters

Introduced separately:

1. General Head

The universal header domain contains header domains that both request and response messages support.

Request URL:请求的URL地址Request Method: 请求方法,get/post/put/……Status Code:状态码,200 为请求成功Remote Address:路由地址
2. Request the head
     1) Accept: Tell the Web server what type of media you accept, */* represents any type, type/* represents all subtypes under that type, and 2) Accept-charset: The browser affirms its own character set Accept-encodi NG: The browser declares itself to receive the encoding method, usually specifies the compression method, whether compression is supported, what compression method is supported (Gzip,deflate) 3) Accept-language: The browser affirms the language it receives.     The difference between language and character set: Chinese is language, Chinese has many character sets, such as BIG5,GB2312,GBK and so on.     4) Authorization: When the client receives a www-authenticate response from the Web server, the header responds to its own authentication information to the Web server. 5) Connection: Indicates whether a persistent connection is required. Close (Tell the Web server or proxy server to disconnect after completing the response of this request, and not wait for subsequent requests for this connection).     Keep-alive (tells the Web server or proxy server, after completing the response of this request, remains connected, waiting for subsequent requests for this connection). 6) Referer: Send Request page URL.     The browser indicates to the Web server from which page/url obtained/clicked the URL/url in the current request.     7) User-agent: The browser indicates its identity (which browser).     8) Host: The domain where the request page is sent.            9) Cache-control: The caching mechanism that the browser should follow. No-cache (do not cache entities that require to be taken from the Web server Now) Max-age: (Only accept objects with an age value less than max-age and no expiration) Max-stale: (Can accept past objects but expire Time must be less than Max-stale value) Min-fresh: (accepts cached objects whose freshness life is greater than the sum of its current age and Min-fresh values) Pramga: Mainly uses Pramga:no-cache, quite     To Cache-control:no-cache. Range: A browser (such as Flashget multi-threaded download) tells the WEB server what part of the object you want to take.    Form: A request header, given the e-mail address of the human user who controls the user agent. Cookie: This is one of the most important request header information

The above lists only the requests I have seen on the head, welcome to correct and add!

3. Response Head
      1) Age: When the proxy server responds to a request with its own cached entity, it uses that header to indicate how long it has been from the time it was generated to the present. 2) The Accept-ranges:web server indicates whether it accepts requests to obtain a portion of its entity, such as a portion of a file.      Bytes: Accept, none: Indicates not accepted.              3) Cache-control: The caching mechanism that the server should follow. Public (can respond to any user with Cached content) private (only cached content responds to the user who previously requested the content) No-cache (can be cached, but only after verifying that it is valid with the Web server to return              Back to client) Max-age: (The expiration time of the object contained in this response) All:no-store (cache not allowed) 4) Connection: Whether a persistent connection is required              Close (the connection is closed).              KeepAlive (connection is maintained, waiting for subsequent requests for this connection). Keep-alive: If the browser requests to remain connected, the header indicates how long (in seconds) you want the WEB server to remain connected. For example: keep-alive:300 5) The Content-encoding:web server indicates what compression method (Gzip,deflate) It uses to compress the objects in the response.      For example: Content-encoding:gzip 6) The Content-language:web server tells the browser the language of the object it responds to. 7) The Content-length:web server tells the browser the length of the object it responds to. For example: content-length:26012 8) The Content-range:web server indicates which part of the entire object the response contains. For example: Content-range:bytes 21010-47021/47022 9) The Content-type:web server tells the browser what type of object it responds to. For example: Content-type:application/xml) The Expired:web server indicates when the entity will expire, for expired objects,It can only be used in response to a customer request after the Web server has verified its validity.     Last-modified:web server considers the last modification time of the object, such as the last modification time of the file, the last generation time of the dynamic page, and so on.     Location:web server tells the browser that the object you are trying to access has been moved to a different location to fetch it at the location specified by the header.     Proxy-authenticate: The proxy server responds to the browser and requires it to provide proxy authentication information.     Server:web server indicates what software and version information it is. Refresh: Indicates how much time the browser should refresh the document, in seconds.

HTTP Header information

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.