1. Accept: indicates the media type that the Web Server accepts. */* indicates any type, and type/* indicates all child types of the type, type/sub-type.
2. Accept-charset: indicates the character set received by the browser.
Accept-encoding: indicates the encoding method received by the browser. It usually specifies the compression method, whether compression is supported, and what compression method (gzip, deflate) is supported)
Accept-language: the browser declares the language it receives
Differences between a language and a character set: Chinese is a language, and Chinese has multiple character sets, such as big5, gb2312, and GBK.
3. Accept-ranges: indicates whether the Web Server accepts a request to obtain a part of an object (such as a part of a file. Bytes: Accept, none: not accept.
4. Age: When the contemporary server uses its own cached entities to respond to requests, it uses this header to indicate how long the entity has elapsed since it was generated.
5. Authorization: when the client receives the WWW-authenticate response from the Web server, it uses this header to respond to its authentication information to the web server.
6. cache-control: Request: No-Cache (the entity that is not cached must be retrieved from the Web server now)
Max-age: (only accept objects whose age value is smaller than the max-age value and has no expiration date)
Max-stale: (Objects in the past can be accepted, but the expiration time must be smaller than the max-stale value)
Min-fresh: (accept the cache object whose fresh life period is greater than the sum of its current age and Min-fresh values)
Response: Public (you can use the cached content to respond to any user)
Private (only the user who previously requested the content can be responded to with the cached content)
No-Cache (it can be cached, but it can only be returned to the client after it is validated with the Web server)
Max-age: (the expiration time of the object contained in this response)
All: No-store (Cache not allowed)
7. Connection: Request: Close (tell the Web server or proxy server to disconnect the connection after the response of this request is completed. Do not wait for subsequent requests of this connection ).
Keepalive (tell the Web server or proxy server to keep the connection after the response of this request is completed and wait for subsequent requests of this connection ).
Response: Close (the connection has been closed ).
Keepalive (the connection remains, waiting for subsequent requests from this connection ).
Keep-alive: If the browser requests to keep the connection, the header indicates how long (in seconds) The web server wants to keep the connection ). Example: keep-alive: 300
8. Content-encoding: indicates the compression method (gzip and deflate) used by the Web server to compress the objects in the response. Example: Content-encoding: Gzip
9. Content-language: the language of the object that the Web server tells the browser to respond.
10. Content-Length: the length of the object that the Web server tells the browser to respond. Example: Content-Length: 26012
11. Content-range: the Web server indicates the part of the object contained in the response. Example: Content-range: bytes 21010-47021/47022
12. Content-Type: the type of the object that the Web server tells the browser to respond. For example, Content-Type: Application/XML
13. etag: it 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, therefore, etag serves almost the same purpose as last-modified, mainly for the Web server to determine whether an object has changed. For example, if the etag of an HTML file is obtained in the previous request, when the file is requested again, the browser will send the previously obtained etag value to the web server, then the Web server compares the etag with the current etag of the file, and then knows whether the file has changed.
14. Expired: the Web server indicates when the object will expire. expired objects can be used to respond to customer requests only after they are verified with the Web server. Is the header of HTTP/1.0. Example: expires: sat, 23 May 2009 10:02:12 GMT
15. HOST: the client specifies the domain name/IP address and port number of the Web server to be accessed. Example: Host: rss.sina.com.cn
16. If-Match: if the object's etag does not change, it means that the object has not changed before the request action is executed.
17. If-None-Match: If the etag of the object changes, the request action is executed only when the object changes.
18. If-modified-since: if the requested object is modified after the time specified in the header, the requested action (such as the returned object) is executed; otherwise, code 304 is returned, tells the browser that the object has not been modified. Example: If-modified-since: Thu, 10 Apr 2008 09:14:42 GMT
19. If-unmodified-since: if the requested object has not been modified after the time specified in the header, the requested action (such as the returned object) will be executed ).
20. If-range: the browser tells the web server that if the requested object does not change, it will give me the part I lack. If the object changes, it will give me the entire object. The browser sends the request object's etag or the last modification time it knows to the Web server to determine whether the object has changed. Always used with the range header.
21. Last-modified: The last modification time of the object, for example, the last modification time of the file and the last generation time of the dynamic page. Example: Last-modified: Tue, 06 May 2008 02:42:43 GMT
22. Location: the Web server tells the browser that the object to be accessed has been moved to another location and retrieved from the specified position in the header. Example: Location: http://i0.sinaimg.cn/dy/deco/2008/0528/sinahome_0803_ws_005_text_0.gif
23. pramga: mainly uses pramga: No-cache, which is equivalent to cache-control: No-cache. Example: Pragma: No-Cache
24. Proxy-Authenticate: the proxy server responds to the browser and requires it to provide Proxy authentication information. Proxy-Authorization: the browser responds to the proxy server's authentication request and provides its own identity information.
25. Range: When a browser (such as flashget multi-thread download) tells the web server which part of the object it wants. Example: range: bytes = 1173546-
26. Referer: the browser indicates to the web server which webpage/URL it obtains/clicks the URL/URL in the current request. Example: Referer: http://www.sina.com/
27. SERVER: indicates the software and version of the web server. Example: SERVER: Apache/2.0.61 (UNIX)
28. User-Agent: indicates the identity of the browser (which browser is used ). 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, 14
29. Transfer-encoding: the Web server indicates the encoding of the Response Message Body (not an object in the message body), such as chunked ). Example: Transfer-encoding: chunked
30. vary: the Web server uses the content in this header to notify the cache server of the conditions under which the returned object can be used to respond to subsequent requests. If the source web server receives the first request message, its response header is: Content-encoding: gzip; vary: the cache server analyzes the header of the subsequent request message and checks whether the accept-encoding is consistent with the vary header value in the previous response, that is, whether the same content encoding method is used, this prevents the cache server from using the compressed entity in its own cache to respond to browsers that do not have the decompression capability. Example: vary: Accept-Encoding
31. Via: lists the proxy servers through which responses from the client to OCs or in the opposite direction are sent, and the Protocol (and version) they use. When a client request arrives at the first proxy server, the server adds the via header to its own request and fills in its own information, when the next proxy server receives the first request from the proxy server, it will copy the via header of the previous proxy server request in its own request and add its own information to the back, similarly, when OCs receives the request from the last proxy server, it checks the via header to know the route through which the request is routed. Example: via: 1.0 236.d0707195.sina.com.cn: 80 (squid/2.6.stable13)
HTTP header Overview