Tip: Ctrl+F for quick search
Header | explain | Example |
---|---|---|
Accept | Specify the content types 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 compression encoding type of content returned by the web server that the browser can support. | Accept-Encoding: compress, gzip |
Accept-Language | Languages accepted by the browser | Accept-Language: en,zh |
Accept-Ranges | You can request one or more sub-range fields of the web page entity | Accept-Ranges: bytes |
Authorization | Authorization certificate for HTTP authorization | Authorization: authorization certificate |
Cache-Control | Specify the caching mechanism that requests and responses follow | Cache-Control: no-cache |
Connection | Indicates whether a persistent connection is required. (HTTP 1.1 makes persistent connections by default) | Connection: close |
Cookie | When an HTTP request is sent, all cookie values stored under the requested domain name will be sent to the web server. | Cookie: $Version=1; Skin=new; |
Content-Length | Requested content length | Content-Length: 348 |
Content-Type | The requested MIME information corresponding to the 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 | Request specific server behavior | Expect: 100-continue |
From | Email of the user who made the request | From: [email protected] |
Host | Specify the domain name and port number of the requested server | Host: www.jsons.cn |
If-Match | Valid only if the request content matches the entity | If-Match: "Specific value" |
If-Modified-Since | If the requested part is modified after the specified time, the request is successful. If it is not modified, 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, a 304 code is returned. The parameter is the Etag previously sent by the server. Compare it with the Etag responded by the server to determine whether it has changed. | If-None-Match: "Specific value" |
If-Range | If the entity has not changed, the server sends the client the missing parts, otherwise the entire entity is sent. 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 | Limit the time that information travels through proxies and gateways | Max-Forwards: 10 |
Pragma | Used to contain implementation-specific instructions | Pragma: no-cache |
Proxy-Authorization | Authorization certificate to connect to the agent | Proxy-Authorization: Authorization certificate linked to the proxy |
Range | Request only part of the entity, specify the range | Range: bytes=500-999 |
Referer | The address of the previous web page, followed by the current requested web page, that is, the origin | Referer: http://www.jsons.cn |
TE | The client is willing to accept the transfer encoding and notifies the server to accept the tail plus header information. | TE: trailers,deflate;q=0.5 |
Upgrade | Specify a transport protocol for the server to convert (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 who made the request | User-Agent: Mozilla/5.0 (Linux; X11) |
Via | Notify intermediate gateway or proxy server address, communication protocol | Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) |
Warning | Warning information about message entities | Warn: 199 Miscellaneous warning |
Header | explain | Example |
---|---|---|
Accept-Ranges | Indicates whether the server supports the specified range request and what type of segmented request | Accept-Ranges: bytes |
Age | Estimated time in seconds from origin server to proxy cache formation (non-negative) | Age: 12 |
Allow | A valid request behavior for a certain network resource. If it is not allowed, 405 will be returned. | Allow: GET, HEAD |
Cache-Control | Tells all caching mechanisms whether they can be cached and of what type | Cache-Control: no-cache |
Content-Encoding | The returned content compression encoding type supported by the web server. | Content-Encoding: gzip |
Content-Language | response body language | Content-Language: en,zh |
Content-Length | Response body length | Content-Length: 348 |
Content-Location | Request an alternative address for the resource | Content-Location: /index.htm |
Content-MD5 | Returns the MD5 check value of the resource | Content-MD5: MD5 check value |
Content-Range | The byte position of this part in the entire return body | Content-Range: bytes 21010-47021/47022 |
Content-Type | Returns the MIME type of the 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 | The current value of the entity tag of the request variable | ETag: "Request variable entity tag current value" |
Expires | Response expiration date and time | 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 the location of a non-requested URL to complete the request or identify a new resource. | Location: http://www.jsons.cn |
Pragma | Includes implementation-specific directives, which can be applied to any receiver in the response chain | Pragma: no-cache |
Proxy-Authenticate | It indicates the authentication scheme and parameters that can be applied to the proxy on that URL | Proxy-Authenticate: Basic |
refresh | Applies to redirect or 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, notify 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 | Set HTTP Cookie | Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1 |
Trailer | Indicates that the 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 request from the origin server | Vary: * |
Via | Tells the proxy where the client response is sent through | Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) |
Warning | Warn about possible problems with entities | Warning: 199 Miscellaneous warning |
WWW-Authenticate | Indicates the authorization scheme that the client requesting entity should use | WWW-Authenticate: Basic |
HTTP request headers provide information about requests, responses or other sending entities. HTTP header information includes four parts: general header, request header, response header and entity header.
Each header field consists of a domain name, a colon (:) and a domain value.
Universal header: can be used in both requests and responses, and is 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 header: The server and the response that pass its own information
Entity header: defines the information of the resource being transferred, which can be used for both requests and responses.