home page > Programmer development tools > Comparison Table of HTTP Request Header and Response Header Information

Comparison Table of HTTP Request Header and Response Header Information

HTTP header information includes four parts: general header, request header, response header and entity header. Each header field consists of a domain name, colon (:) and domain value. HTTP request and output can be divided into two parts: Request and Response.

General header: It can be used for both requests and responses. It is associated with transactions as a whole rather than specific resources.

Request header: Allow the client to pass information about itself and the desired response form.

Response header: The response of the server and the server to transmit their own information.

Entity header: Information defining the transmitted resource. It can be used for both requests and responses.

HTTP Request Header

Header Description Example
Accept Specify the content type that the client can receive Accept: text/plain, text/html
Accept-Charset Character encoding set acceptable to the browser Accept-Charset: iso-8859-5
Accept-Encoding Specify the web server return content compression encoding type that the browser can support Accept-Encoding: compress, gzip
Accept-Encoding Specify the web server return content compression encoding type that the browser can support Accept-Encoding: compress, gzip
Accept-Language Browser acceptable language Accept-Language: en,zh
Accept-Language Browser acceptable language Accept-Language: en,zh
Accept-Ranges You can request one or more sub range fields of a web page entity Accept-Ranges: bytes
Authorization Authorization certificate for HTTP authorization Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
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 connection by default) Connection: close
Cookie When an HTTP request is sent, all cookie values saved under the request domain name will be sent to the web server together 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 Date and time when 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 who sent the request From: user@email.com
Host Specify the domain name and port number of the requested server Host: www.zcmhi.com
If-Match Only valid if the request content matches the entity If-Match: “737060cd8c284d8af7ad3082f209582d”
If-Modified-Since If the requested part is modified after the specified time, the request succeeds. If it is not modified, code 304 is returned If-Modified-Since: Sat, 29 Oct 2010 19:43:31 GMT
If-None-Match If the content has not changed, the 304 code is returned. The parameter is the Etag sent by the server previously. Compare it with the Etag responded by the server to determine whether it has changed If-None-Match: “737060cd8c284d8af7ad3082f209582d”
If-Range If the entity has not changed, the server will send the missing part of the client, otherwise the entire entity will be sent. The parameter is also Etag If-Range: “737060cd8c284d8af7ad3082f209582d”
If-Unmodified-Since The request succeeds only when 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 is transmitted through agents and gateways Max-Forwards: 10
Pragma Used to contain implementation specific instructions Pragma: no-cache
Proxy-Authorization Used to contain implementation specific instructions Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Range Request only part of the entity, specify the scope Range: bytes=500-999
Referer The address of the previous page, followed by the current request page, that is, the origin Referer: https://tool.ip138.com/httpheader/
TE The client is willing to accept the transmission code and notify the server to accept the header information TE: trailers,deflate; q=0.5
Upgrade Specify a transport 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 the information of the user who sent the request User-Agent: Mozilla/5.0 (Linux; X11)
Via Notify the intermediate gateway or proxy server address and communication protocol Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Warning Warning about message entities Warn: 199 Miscellaneous warning

HTTP Responses Header

Header Description Example
Accept-Ranges Indicates whether the server supports the specified range request and what type of segmentation request Accept-Ranges: bytes
Age Estimated time from the original server to the proxy cache formation (in seconds, non negative) Age: 12
Allow A valid request for a network resource. If it is not allowed, 405 is returned Allow: GET, HEAD
Cache-Control Tell whether all caching mechanisms can cache and what type Cache-Control: no-cache
Content-Encoding The returned content compression coding types supported by the web server Content-Encoding: gzip
Content-Language Language of response body Content-Language: en,zh
Content-Length Length of response body Content-Length: 348
Content-Location Request another alternate address for the resource Content-Location: /index.htm
Content-MD5 Return the MD5 check value of the resource Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ==
Content-Range The byte position of this part in the whole return body Content-Range: bytes 21010-47021/47022
Content-Type MIME type of returned content Content-Type: text/html; charset=utf-8
Date Time when the original server message was sent Date: Tue, 15 Nov 2010 08:12:31 GMT
ETag Current value of the entity label of the request variable ETag: “737060cd8c284d8af7ad3082f209582d”T
Expires Date and time when the response expires 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 It is used to redirect the receiver to the location of non request URL to complete the request or identify new resources Location: https://tool.ip138.com/httpheader/
Pragma Including the implementation of specific instructions, which can be applied to any receiver in the response chain Pragma: no-cache
Proxy-Authenticate It indicates the authentication scheme and the parameters that can be applied to the URL of the proxy Proxy-Authenticate: Basic
refresh It is used for redirection or a new resource is created and redirected 5 seconds later (proposed by Netscape and supported by most browsers) Refresh: 5; url= https://tool.ip138.com/httpheader/
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 Cookies Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1
Trailer Point out that the header field exists at the end of the block transmission code Trailer: Max-Forwards
Transfer-Encoding File transmission code Transfer-Encoding:chunked
Vary Tell the downstream agent whether to use the cached response or request from the original server Vary: *
Via Tell the proxy client where the response is sent Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)
Warning Warn the entity of possible problems Warning: 199 Miscellaneous warning
WWW-Authenticate Indicates the authorization scheme that the client request entity should use WWW-Authenticate: Basic