Tips: Ctrl+F Quick Search
Header | Description | 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 content compression encoding types that the browser can support for web server responses. | Accept-Encoding: compress, gzip |
Accept-Language | Languages acceptable to the browser | Accept-Language: en,zh |
Accept-Ranges | Can request one or more sub-range fields of the web entity | Accept-Ranges: bytes |
Authorization | Authorization credentials for HTTP authentication | Authorization: credentials |
Cache-Control | Specifies the caching mechanism that requests and responses follow | Cache-Control: no-cache |
Connection | Indicates whether a persistent connection is needed. (HTTP 1.1 defaults to persistent connections) | Connection: close |
Cookie | When an HTTP request is sent, all cookie values saved under the request domain name are sent to the web server together. | Cookie: $Version=1; Skin=new; |
Content-Length | Length of the request content | Content-Length: 348 |
Content-Type | MIME information corresponding to the entity of the request | 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 for the request | Host: www.jsons.cn |
If-Match | Only valid if the request content matches the entity | If-Match: "specific value" |
If-Modified-Since | Request succeeds if the requested part was modified after the specified time, returns 304 code if not modified | If-Modified-Since: Sat, 29 Oct 2010 19:43:31 GMT |
If-None-Match | Returns 304 code if content hasn't changed, parameter is Etag sent by server previously, compared with Etag回应的 by server to determine change | If-None-Match: "specific value" |
If-Range | If entity hasn't changed, server sends the part missing by client, otherwise sends entire entity. Parameter is also Etag | If-Range: "specific value" |
If-Unmodified-Since | Request succeeds only if entity hasn't been modified after 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 to connect to proxy | Proxy-Authorization: credentials to connect to proxy |
Range | Requests only a part of the entity, specifies range | Range: bytes=500-999 |
Referer | Address of previous webpage, current request webpage follows it, i.e., referrer | Referer: http://www.jsons.cn |
TE | Transport encoding that client is willing to accept, and informs server to accept trailing header information | TE: trailers,deflate;q=0.5 |
Upgrade | Specifies a transport protocol to server for conversion if supported | Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 |
User-Agent | Content of User-Agent includes information about the user making the request | User-Agent: Mozilla/5.0 (Linux; X11) |
Via | Informs intermediate gateway or proxy server address, communication protocol | Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) |
Warning | Warning information about message entity | Warn: 199 Miscellaneous warning |
Header | Description | Example |
---|---|---|
Accept-Ranges | Indicates whether server supports specified range requests and what type of segmented requests | Accept-Ranges: bytes |
Age | Estimated time (in seconds, non-negative) from origin server to proxy cache formation | Age: 12 |
Allow | Valid request actions for a network resource, returns 405 if not allowed | Allow: GET, HEAD |
Cache-Control | Tell all the caching mechanism whether it can cache and which type | Cache-Control: no-cache |
Content-Encoding | Content compression encoding types supported by the web server. | 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 value |
Content-Range | Byte position of this part 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 | Time when the origin server sent the message | Date: Tue, 15 Nov 2010 08:12:31 GMT |
ETag | Current value of the entity tag for the requested variable | ETag: "current value of requested variable entity tag" |
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 receiver to a non-request URL location 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 receiver in the response chain | Pragma: no-cache |
Proxy-Authenticate | Indicates the authentication scheme and parameters applicable to the proxy for this URL | Proxy-Authenticate: Basic |
refresh | Applied to redirects or when a new resource is created, redirects 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, notifies the client to try again after the specified time | Retry-After: 120 |
Server | Web server software name | Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) |
Set-Cookie | Sets Http Cookie | Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1 |
Trailer | Indicates that header fields exist at the end of the chunked transfer encoding | Trailer: Max-Forwards |
Transfer-Encoding | File transfer encoding | Transfer-Encoding:chunked |
Vary | Tells downstream proxies whether to use cached responses or request from the origin server | Vary: * |
Via | Informs the proxy client where the response was sent from | Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) |
Warning | Warns about potential problems with the entity | Warning: 199 Miscellaneous warning |
WWW-Authenticate | Indicates the authorization scheme that the client should use for the requested entity | WWW-Authenticate: Basic |
HTTP headers convey metadata about requests, responses, or transmitted entities, categorized into four types: general headers (shared), request headers (client-specific), response headers (server-specific), and entity headers (body-related).
A header field is composed of three components: a field name, a colon (:) delimiter, and a field value.
General headers: These headers are valid for both request and response messages, providing metadata that applies to the entire communication context rather than individual resources or transactions.
Request headers: Enable the client to convey metadata about its identity and preferred response characteristics (e.g., content type, encoding).
Response headers: Allow the server to communicate metadata about its state and capabilities in the response message.
Entity headers: Describe characteristics of the resource being transferred, valid in both request and response messages.
Links: Developer Tools