HTTP Request Header
Header Explanation Example
Accept Specifies the type of content the client can receive Accept: text/plain, text/html
Accept-Charset The character encoding set that the browser can accept. Accept-Charset: iso-8859-5
Accept-Encoding Specifies the type of compression encoding that the browser can support for the content returned by the web server. Accept-Encoding: compress, gzip
Accept-Language Browser-acceptable languages Accept-Language: en,zh
Accept-Ranges One or more sub-scope fields of the web page entity can be requested. Accept-Ranges: bytes
Authorization Authorization certificate for HTTP authorization Authorization: Authorization certificate
Cache-Control Specifies the caching mechanism to be followed for requests and responses Cache-Control: no-cache
Connection Indicates whether a persistent connection is required. (HTTP 1.1 defaults to persistent connections) Connection: close
Cookie HTTP requests are sent to the web server with all the cookies stored under the requested domain name. Cookie: $Version=1; Skin=new;
Content-Length The length of the request Content-Length: 348
Content-Type The MIME information of the requested entity Content-Type: application/x-www-form-urlencoded
Date The date and time the request was sent Date: Tue, 15 Nov 2010 08:12:31 GMT
Expect The specific server behavior requested Expect: 100-continue
From Email of the user who sent the request From: user@jsons.cn
Host Domain name and port number of the server that specified the request Host: www.jsons.cn
If-Match Only valid if the request matches the entity. If-Match: "specific value"
If-Modified-Since If the requested part is changed after the specified time, the request succeeds, and if it is not changed, a 304 code is returned. If-Modified-Since: Sat, 29 Oct 2010 19:43:31 GMT
If-None-Match If the content has not changed return 304 code, the parameter is the Etag previously sent by the server, compared with the Etag of the server response to determine whether it has changed or not If-None-Match: "Specific value".
If-Range If the entity has not changed, the server sends the missing part of the client, otherwise it sends the whole entity. The parameter is also an Etag If-Range: "Specific value".
If-Unmodified-Since The request succeeds only if the entity has not been modified after the specified time. If-Unmodified-Since: Sat, 29 Oct 2010 19:43:31 GMT
Max-Forwards Limit the amount of time a message can be transmitted through the proxy and gateway. Max-Forwards: 10
Pragma Used to include implementation-specific instructions Pragma: no-cache
Proxy-Authorization Authorization certificate for linking to the proxy Proxy-Authorization: Link to the proxy's authorization certificate.
Range Requests only a portion of an entity, specifies the scope. Range: bytes=500-999
Referer The address of the previous page, followed by the currently requested page, i.e., the incoming path. Referer: http:
TE Transmission encoding that the client is willing to accept, and notifies the server of the acceptance of the tail-plus-header information. TE: trailers,deflate;q=0.5
Upgrade Specify a transport protocol to the server for the server to convert (if supported). Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11
User-Agent The content of the User-Agent contains information about the user making the request. User-Agent: Mozilla/5.0 (Linux; X11)
Via Notification of the address of the intermediate gateway or proxy server, communication protocols Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Warning Warning message about the message entity Warn: 199 Miscellaneous warning
HTTP Responses Header
Header Interpretation Example
Accept-Ranges Indicates whether the server supports the specified range of requests and what type of segmented requests are supported. Accept-Ranges: bytes
Age Estimated time (in seconds, non-negative) to form a proxy cache from the origin server. Age: 12
Allow Valid request behavior for a network resource, return 405 if not allowed. Allow: GET, HEAD
Cache-Control Tells all caching mechanisms if caching is allowed and of what type. Cache-Control: no-cache
Content-Encoding The type of compression encoding supported by the web server for the returned content. Content-Encoding: gzip
Content-Language Language of the response body Content-Language: en,zh
Content-Length The length of the response body Content-Length: 348
Content-Location Alternate address to which the requested resource can be substituted. Content-Location: /index.htm
Content-MD5 The MD5 checksum of the returned resource Content-MD5: MD5 checksum value
Content-Range Byte position of this section in the entire response body Content-Range: bytes 21010-47021/47022
Content-Type MIME type of the returned content Content-Type: text/html; charset=utf-8
Date The time the original server message was sent Date: Tue, 15 Nov 2010 08:12:31 GMT
ETag Current value of the entity tag of the request variable ETag: "Current value of the entity tag of the request variable"
Expires The date and time the response expired Expires: Thu, 01 Dec 2010 16:00:00 GMT
Last-Modified The last modification time of the requested resource Last-Modified: Tue, 15 Nov 2010 12:45:26 GMT
Location Used to redirect the recipient to a non-requested URL to complete the request or identify a new resource. Location: http:
Pragma Includes implementation-specific instructions that can be applied to any recipient in the response chain. Pragma: no-cache
Proxy-Authenticate It indicates the authentication scheme and parameters that can be applied to the proxy at that URL. Proxy-Authenticate: Basic
refresh Applies to redirects or a new resource is created and redirected after 5 seconds (proposed by Netscape and supported by most browsers).
Refresh: 5; url= http:
Retry-After If the entity is temporarily undesirable, the client is notified to try again after a specified period of time. Retry-After: 120
Server Web server software name Server: Apache/1.3.27 (Unix) (Red-Hat/Linux)
Set-Cookie Set Http Cookie Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1
Trailer Indicates that a header field exists at the end of the chunked transfer encoding. Trailer: Max-Forwards
Transfer-Encoding File Transfer Encoding Transfer-Encoding:chunked
Vary Tells the downstream proxy whether to use a cached response or to request from the origin server. Vary: *
Via Tells the proxy where the client response was sent Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Warning Warns the entity of possible problems Warning: 199 Miscellaneous warning
WWW-Authenticate Indicates the authorization scheme that the client requesting entity should use WWW-Authenticate: Basic
Access to records: