Home > Article > Web Front-end > HTTP header_html/css_WEB-ITnose
HTTP (HyperTextTransferProtocol) is the Hypertext Transfer Protocol, which is currently the common protocol for web page transmission. The HTTP protocol adopts a request/response model. The browser or other client issues a request and the server responds. As far as the entire network resource transmission is concerned, it includes message-header and message-body. First pass message- header, that is, http headerMessage. http header messages are usually divided into 4 parts: general header, request header, response header, entity header. However, in terms of understanding, the boundaries of this division are not very clear. According to the organization form of http header content in Wikipedia, it is roughly divided into two parts: Request and Response.
Accept | Specify the content type that 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 content compression encoding type returned by the web server that the browser can support. | Accept-Encoding: compress, gzip | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Accept-Language | Browser-accepted language | 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: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Cache-Control | Specify the caching mechanism 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, the cookie stored under the request domain name will be All cookie values are sent together 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 | Requested specific server behavior | Expect: 100-continue | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From | Email of the user who made 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 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, return 304 code , the parameter is the Etag previously sent by the server, and is compared 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 sends the missing part from the client, otherwise the entire entity is sent.Parameters are also Etag | If-Range: "737060cd8c284d8af7ad3082f209582d" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If-Unmodified-Since | Only if the entity has not been modified after the specified time The request is successful | If-Unmodified-Since: Sat, 29 Oct 2010 19:43:31 GMT | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Max-Forwards | Restrict information from passing Time spent by proxies and gateways | Max-Forwards: 10 : no-cache | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Proxy-Authorization | Authorization certificate to connect to the proxy | Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Range | Only request a 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 source | Referer: http://www.zcmhi.com/archives/71.html | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TE | The transfer encoding that the client is willing to accept, and notifies the server to accept the tail plus 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 user information that made the request | User-Agent: Mozilla/5.0 (Linux; X11 ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Via | Notify the 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Accept-Ranges | Indicates whether the server supports specified range requests and what type of segmented requests | Accept-Ranges: bytes |
Age | Estimated time in seconds from origin to proxy cache formation | 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 | Tell all caching mechanisms whether they can be cached and what type | Cache-Control: no-cache |
Content-Encoding | The returned content compression encoding type supported by the web server. | 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 | Request an alternate address for the resource | Content-Location: /index.htm |
Content-MD5 | Return the MD5 check value of the resource | Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ== |
Content-Range | In this part of the entire return body Byte position | Content-Range: bytes 21010-47021/47022 |
Content-Type | Return the MIME type of the content | Content-Type: text/html; charset=utf-8 |
Date | The time when 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: "737060cd8c284d8af7ad3082f209582d" |
Expires | The date and time the response expires | Expires: Thu, 01 Dec 2010 16:00:00 GMT |
Last-Modified | The last modified time of the requested resource | Last-Modified: Tue, 15 Nov 2010 12:45:26 GMT |
Location | is used to redirect the recipient to the location of the non-requested URL to complete the request or identify a new resource | Location: http://www.zcmhi.com/archives/94.html |
Pragma | Contains implementation-specific instructions that can be applied to any receiver in the response chain | Pragma: no-cache |
Proxy-Authenticate | It indicates the authentication scheme and parameters on that URL that can be applied to the proxy | Proxy-Authenticate: Basic |
refresh | Apply to redirect or a new resource is created, redirect after 5 seconds (proposed by Netscape, supported by most browsers) |
Refresh: 5; url= http://www.zcmhi.com/archives/94.html |
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 | Informs the proxy where the client response was sent | Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1) |
Warning | Warning entity about possible problems | Warning: 199 Miscellaneous warning |
WWW-Authenticate | Indicates the authorization scheme that the client requesting entity should use | WWW-Authenticate: Basic |