Http header header information parameters explain

  
                  HTTP (HyperTextTransferProtocol) is a hypertext transfer protocol, a general protocol for current web page transmission. The HTTP protocol uses a request/response model, and the browser or other client makes a request, and the server gives a response. In terms of the entire network resource transmission, it includes the message-header and the message-body. First pass the message-header, which is the http header message. 1. Accept: tells the WEB server what media type to accept, */* means any type, type/* means all subtypes under that type, type/sub-type. 2. Accept-Charset: The browser declares the character set Accept-Encoding: The browser declares the encoding method it receives. It usually specifies the compression method, whether it supports compression, and what compression method (gzip, deflate) Accept-Language:: The browser declares the difference between the language language it receives and the character set: Chinese is a language, and Chinese has multiple character sets, such as big5, gb2312, gbk, and so on. 3. Accept-Ranges: The WEB server indicates whether it accepts a request to get a part of one of its entities (such as a part of a file). Bytes: means accept, none: means not accepted. 4. Age: When the proxy server responds to the request with its own cached entity, this header is used to indicate how long the entity has passed since its creation. 5. Authorization: When the client receives the WWW-Authenticate response from the WEB server, it uses this header to respond to its own authentication information to the WEB server. 6. Cache-Control: Request: no-cache (do not cache the entity, request to get it from the WEB server now) max-age: (only accepts objects whose Age value is less than max-age value and has no expired) max-stale: (Past objects can be accepted, but the expiration time must be less than the max-stale value) min-fresh: (Accept the cached object whose fresh lifetime is greater than the sum of its current Age and min-fresh values) Response: public (Cached content can be used Respond to any user) private (only the cached content can be used to respond to the user who previously requested the content) no-cache (can be cached, but can only be returned to the client after verifying that it is valid with the web server) max-age:( The expiration time of the object contained in this response) ALL: no-store (disallow caching) 7. Connection: request: close (tell the WEB server or proxy server, disconnect after completing the response of this request, do not wait for this Subsequent requests for secondary connections). Keepalive (tells the WEB server or proxy server to keep the connection after waiting for the response of this request, waiting for subsequent requests for this connection). Response: close (connection has been closed). Keepalive (the connection remains, waiting for subsequent requests for this connection). Keep-Alive: If the browser requests to stay connected, this header indicates how long (in seconds) the web server is expected to remain connected. For example: Keep-Alive: 3008. Content-Encoding: The WEB server indicates what compression method (gzip, deflate) it uses to compress the objects in the response. For example: Content-Encoding: gzipContent-Language: The language of the object that the web server tells the browser to respond to. Content-Length: The length of the object that the WEB server tells the browser to respond to. For example: Content-Length: 26012Content-Range: The WEB server indicates which part of the entire object the response contains. For example: Content-Range: bytes 21010-47021/47022Content-Type: The type of object that the WEB server tells the browser to respond to. For example: Content-Type: application/xml9. ETag: is the flag value of an object (such as a URL). For an object, such as an html file, if it is modified, its Etag will not be modified, so ETag The role is similar to the role of Last-Modified, mainly for the WEB server to determine whether an object has changed. For example, when an html file was requested for the previous time, the ETag was obtained. When the file was requested again, the browser will send the previously obtained ETag value to the WEB server, and the WEB server will follow the ETag with the file. The current ETag is compared and then you know if the file has changed. 10. Expired: The WEB server indicates when the entity will expire. For expired objects, the client can only respond to client requests after verifying its validity with the WEB server. Is the head of HTTP/1.0. For example: Expires:Sat, 23 May 2009 10:02:12 GMT11. Host: The client specifies the domain name/IP address and port number of the WEB server that you want to access. For example: Host: rss.sina.com.cn12. If-Match: If the ETag of the object has not changed, it means that the object has not changed before the requested action is executed. If-None-Match: If the ETag of the object changes, it means that the object has also changed, and the requested action is executed. 13. If-Modified-Since: If the requested object is modified after the specified time of the header, the requested action (such as returning the object) is executed, otherwise the return code 304 is sent to the browser to notify the browser that the object has not been modified. For example: If-Modified-Since:Thu, 10 Apr 2008 09:14:42 GMTIf-Unmodified-Since: Execute the requested action (such as returning an object) if the requested object has not been modified after the specified time of the header. . 14. If-Range: The browser tells the WEB server that if the object I requested has not changed, I will give me the missing part. If the object changes, I will give the whole object to me. The browser sends the ETag of the request object or the last modification time known to the web server to the WEB server to determine whether the object has changed. Always used with the Range header. 15. Last-Modified: The last modification time of the object that the WEB server considers, such as the last modification time of the file, the last generation time of the dynamic page, and so on. For example: Last-Modified:Tue, 06 May 2008 02:42:43 GMT16. Location: The WEB server tells the browser that the object that was trying to access has been moved to another location and is taken to the location specified by the header. For example: Location: 17. Pramga: mainly uses Pramga: no-cache, which is equivalent to Cache-Control: no-cache. For example: Pragma: no-cache18. Proxy-Authenticate: The proxy server responds to the browser and asks for proxy authentication information. Proxy-Authorization: The browser responds to the proxy server's authentication request and provides its own identity information. 19. Range: The browser (such as Flashget multi-threaded download) tells the WEB server which part of the object it wants to fetch. For example: Range: bytes=1173546-20. Referer: The browser indicates to the WEB server which web page/URL from which to get/click the URL/URL in the current request. For example: Referer: http://www.45it.com/21. Server: The WEB server indicates what software and version it is. For example: Server: Apache/2.0.61 (Unix) 22. User-Agent: The browser indicates its identity (which browser). For example: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv: 1.8.1.14) Gecko/20080404 Firefox/2.0.0.1423. Transfer-Encoding: The WEB server indicates its own response message body ( It is not the object in the message body. It is coded, such as whether it is chunked. For example: Transfer-Encoding: chunked24. Vary: The WEB server uses the contents of this header to tell the Cache server under what conditions to respond to subsequent requests with the object returned by this response. If the source WEB server receives the first request message, the header of the response message is: Content-Encoding: gzip; Vary: Content-Encoding, then the Cache server analyzes the header of the subsequent request message and checks its Accept-Encoding. Whether it is consistent with the Vary header value of the previous response, that is, whether to use the same content encoding method, this can prevent the Cache server from responding to the browser without decompression with the compressed entity in its own Cache. For example: Vary: Accept-Encoding25. Via: Lists which proxy servers have passed the response from the client to the OCS or vice versa, and what protocol (and version) they sent the request with. When the client requests to reach the first proxy server, the server will add a Via header to the request sent by itself, and fill in its own relevant information. When the next proxy server receives the request from the first proxy server, it will Copy the Via header of the request of the previous proxy server in the request sent by itself, and add its own related information to the following, and so on. When the OCS receives the request from the last proxy server, check the Via header. Know the route through which the request went. For example: Via: 1.0 236-81.D07071953.sina.com.cn: 80 (squid/2.6.STABLE13)========================== =========================================================== ====================================================== Request message header instance: Host: rss.sina.com.cn User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv: 1.8.1.14) Gecko/20080404 Firefox/2.0.0.14Accept: Text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5Accept-Language:zh-cn,zh ;q=0.5Accept-Encoding:gzip,deflateAccept-Charset:gb2312,utf-8;q=0.7,*;q=0.7Keep-Alive:300Connection:keep-aliveCookie:userId=C5bYpXrimdmsiQmsBPnE1Vn8ZQmdWSm3WRlEB3vRwTnRtW <-- CookieIf-Modified- Since:Sun, 01 Jun 2008 12:05:30 GMTCache-Control: max-age=0HTTP response message Header instance: Status: OK - 200 <-- Response status code, indicating the result of web server processing. Date:Sun, 01 Jun 2008 12:35:47 GMTServer: Apache/2.0.61 (Unix) Last-Modified: Sun, 01 Jun 2008 12:35:30 GMTAccept-Ranges:bytesContent-Length:18616Cache-Control:max- Age=120Expires:Sun, 01 Jun 2008 12:37:47 GMTContent-Type:application/xmlAge:2X-Cache:HIT from 236-41.D07071951.sina.com.cn <-- HTTP used by the reverse proxy server Head Via: 1.0 236-41.D07071951.sina.com.cn: 80 (squid/2.6.STABLE13) Connection:close
Copyright © Windows knowledge All Rights Reserved