Tip: Ctrl+F quick search
| Header | Explanation | Example |
|---|---|---|
| Accept | Specifies the content types that the client can accept. | Accept: text/plain, text/html |
| Accept-Charset | Character encoding sets that the browser can accept. | Accept-Charset: iso-8859-5 |
| Accept-Encoding | Specifies the compression encoding types that the browser can support for web server returned content. | Accept-Encoding: compress, gzip |
| Accept-Language | Languages acceptable to the browser. | Accept-Language: en,zh |
| Accept-Ranges | Can request one or more subrange fields of the web page entity. | Accept-Ranges: bytes |
| Authorization | Authorization credentials for HTTP authorization. | Authorization: authorization credentials |
| Cache-Control | Specifies the cache mechanism to be followed by requests and responses. | Cache-Control: no-cache |
| Connection | Indicates whether a persistent connection is required. (HTTP 1.1 uses persistent connections by default.) | Connection: close |
| Cookie | When an HTTP request is sent, all cookie values stored under the request domain are sent to the web server. | Cookie: $Version=1; Skin=new; |
| Content-Length | Content length of the request. | Content-Length: 348 |
| Content-Type | MIME information of the request corresponding to the entity. | Content-Type: application/x-www-form-urlencoded |
| Date | Date and time the request was sent. | Date: Tue, 15 Nov 2010 08:12:31 GMT |
| Expect | Specific server behavior requested. | Expect: 100-continue |
| From | Email of the user making the request. | From: user@jsons.cn |
| Host | Specifies the domain name and port number of the server being requested. | Host: www.jsons.cn |
| If-Match | Only valid if the request content matches the entity. | If-Match: \"specific value\" |
| If-Modified-Since | If the requested part has been modified after the specified time, the request succeeds; if not modified, returns 304 code. | If-Modified-Since: Sat, 29 Oct 2010 19:43:31 GMT |
| If-None-Match | If the content has not changed, returns 304 code. The parameter is the Etag previously sent by the server, compared with the server's responding Etag to determine if changed. | If-None-Match: \"specific value\" |
| If-Range | If the entity has not changed, the server sends the part lost by the client; otherwise sends the entire entity. The parameter is also 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 | Limits the time information is transmitted through proxies and gateways. | Max-Forwards: 10 |
| Pragma | Used to contain implementation-specific directives. | Pragma: no-cache |
| Proxy-Authorization | Authorization credentials for connecting to a proxy. | Proxy-Authorization: authorization credentials for connecting to a proxy |
| Range | Requests only a part of the entity, specifying the range. | Range: bytes=500-999 |
| Referer | Address of the previous web page, the current request follows it, i.e., referrer. | Referer: http://www.jsons.cn |
| TE | Transfer encodings the client is willing to accept, and notifies the server to accept trailer header information. | TE: trailers,deflate;q=0.5 |
| Upgrade | Specifies a certain transfer protocol to the server for conversion (if supported). | Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 |
| User-Agent | The content of User-Agent contains information about the user making the request. | User-Agent: Mozilla/5.0 (Linux; X11) |
| Via | Notifies intermediate gateway or proxy server address, communication protocol. | Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) |
| Warning | Warning information about the message entity. | Warn: 199 Miscellaneous warning |
| Header | Explanation | Example |
|---|---|---|
| Accept-Ranges | Indicates whether the server supports range requests and what type of range requests. | Accept-Ranges: bytes |
| Age | Estimated time from the origin server to the proxy cache (in seconds, non-negative). | Age: 12 |
| Allow | Valid request methods for a network resource, returns 405 if not allowed. | Allow: GET, HEAD |
| Cache-Control | Tells all caching mechanisms whether and what type of caching is allowed. | Cache-Control: no-cache |
| Content-Encoding | Compression encoding types supported by the web server for returned content. | Content-Encoding: gzip |
| Content-Language | Language of the response body. | Content-Language: en,zh |
| Content-Length | Length of the response body. | Content-Length: 348 |
| Content-Location | Alternative address for the requested resource. | Content-Location: /index.htm |
| Content-MD5 | MD5 checksum of the returned resource. | Content-MD5: MD5 checksum |
| Content-Range | Byte position of this part within 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 | Time the origin server message was sent. | Date: Tue, 15 Nov 2010 08:12:31 GMT |
| ETag | Current value of the entity tag for the requested variable. | ETag: \"current value of the entity tag for the requested variable\" |
| Expires | Date and time when the response expires. | Expires: Thu, 01 Dec 2010 16:00:00 GMT |
| Last-Modified | 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://www.jsons.cn |
| Pragma | Includes implementation-specific directives that can be applied to any recipient on the response chain. | Pragma: no-cache |
| Proxy-Authenticate | It indicates the authentication scheme and parameters applicable to the URL for the proxy. | Proxy-Authenticate: Basic |
| refresh | Applied to redirection or when a new resource is created, redirect after 5 seconds (proposed by Netscape, supported by most browsers). |
Refresh: 5; url= http://www.jsons.cn
|
| Retry-After | If the entity is temporarily unavailable, informs the client to try again after a specified 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 header fields are present in the trailer of a chunked transfer encoding. | Trailer: Max-Forwards |
| Transfer-Encoding | File transfer encoding. | Transfer-Encoding:chunked |
| Vary | Tells downstream proxies whether to use a cached response or request from the origin server. | Vary: * |
| Via | Informs the proxy where the client response was sent through. | Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) |
| Warning | Warns of possible problems with the entity. | Warning: 199 Miscellaneous warning |
| WWW-Authenticate | Indicates the authorization scheme that should be used for the client requested entity. | WWW-Authenticate: Basic |
HTTP headers provide information about the request, response, or other sent entities. HTTP header information includes four parts: general header, request header, response header, and entity header.
Each header field consists of a field name, a colon (:), and a field value.
General headers: can be used for both requests and responses, and are associated with the transaction as a whole rather than a specific resource.
Request headers: allow the client to pass information about itself and the desired response form.
Response headers: used by the server to pass information about itself in the response.
Entity headers: define information about the transferred resource, can be used in both requests and responses.