HTTP Header Specific explanation

Source: Internet
Author: User
Tags ranges

HTTP (hypertexttransferprotocol) is the hypertext transfer protocol, the Universal protocol for the current web page Transmission. The HTTP protocol uses the Request/response model, and the browser or other client makes the Request. The server responds. In terms of the entire network resource transmission, Message-header and Message-body are Included. First pass the Message-header. That HTTP HeaderNews . HTTP header messages are usually divided into 4 sections: general header, request header, Response header, entity Header.

But this kind of division in terms of understanding, the sense of the boundary is not quite clear.

Based on Wikipedia's organization of HTTP header content, It is broadly divided into two parts: request and Response.

Header Explanation Demo sample
Accept-ranges Indicates whether the server supports the specified range request and what kind of staging request Accept-ranges:bytes
Age Estimated Time (in seconds, Non-negative) formed from the original server to the proxy cache Age:12
Allow A valid request behavior for a network resource is returned with a 405 allow:get, HEAD
Cache-control Tell if all caching mechanisms are sufficient to cache and which type Cache-control:no-cache
Content-encoding Webserver supports the return content compression encoding Type. Content-encoding:gzip
Content-language The language of the response body Content-language:en,zh
Content-length The length of the response body content-length:348
Content-location There is an alternative to the requested resource, and an address. Content-location:/index.htm
Content-md5 Returns the MD5 checksum value of a resource content-md5:q2hly2sgsw50zwdyaxr5iq==
Content-range The byte position of this section 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 that the original server message was issued date:tue, 08:12:31 GMT
ETag The current value of the entity label of the request variable ETag: "737060cd8c284d8af7ad3082f209582d"
Expires Date and time when the response expires expires:thu, 16:00:00 GMT
Last-modified Last modified time of request resource last-modified:tue, 12:45:26 GMT
Location Used to redirect the receiver to the location of the Non-request URL to complete the request or identify the new resource Location:http://www.zcmhi.com/archives/94.html
Pragma Contains implementation-specific instructions that can be applied to whatever receiver on the response chain Pragma:no-cache
Proxy-authenticate It indicates the authentication scheme and the number of references on the URL that can be applied to the agent Proxy-authenticate:basic
Refresh Applied to redirect or a new resource was created, redirected after 5 seconds (proposed by netscape, supported by most Browsers)

refresh:5; Url=http://www.zcmhi.com/archives/94.html

Retry-after Suppose the entity is temporarily undesirable. Notifies the client to try again after a specified time retry-after:120
Server Webserver 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 Indicates that the header domain is present at the end of the chunked transfer code Trailer:max-forwards
Transfer-encoding File transfer encoding Transfer-encoding:chunked
Vary Tells the downstream agent whether to use the cache response or the original server request Vary: *
Via Tells the proxy client where the response was sent by via:1.0 fred, 1.1 nowhere.com (apache/1.1)
Warning Warning about possible issues with the entity warning:199 Miscellaneous Warning
Www-authenticate Indicates the authorization scheme that the client request entity should use Www-authenticate:basic

Many other visit website header Field definitions

Content-type The requested MIME information corresponding to the entity content-type:application/x-www-form-urlencoded
Date Date and time the request was sent date:tue, 08:12:31 GMT
Expect The specific server behavior of the request Expect:100-continue
From Email from the user who made the request From: [email protected]
Host Specify the domain name and port number of the requested server Host:www.zcmhi.com
If-match Only the requested content matches the entity to be valid If-match: "737060cd8c284d8af7ad3082f209582d"
If-modified-since The request succeeds if the part of the request is altered after the specified time. Return 304 code if not changed if-modified-since:sat, Oct 19:43:31 GMT
If-none-match The 304 code is returned if the content has not changed. The number of references to the ETag previously sent by the server is inferred from the etag of the server Response. If-none-match: "737060cd8c284d8af7ad3082f209582d"
If-range Assuming that the entity has not changed, the server sends the missing part of the Client. otherwise, the entire entity is Sent.

The number of references is also etag

If-range: "737060cd8c284d8af7ad3082f209582d"
If-unmodified-since Request succeeds only if the entity has not been modified since the specified time if-unmodified-since:sat, Oct 19:43:31 GMT
Max-forwards Limit the time that information is transmitted through agents and gateways Max-forwards:10
Pragma Used to include implementation-specific instructions Pragma:no-cache
Proxy-authorization Connect to an authorization certificate for the agent Proxy-authorization:basic qwxhzgrpbjpvcgvuihnlc2ftzq==
Range Just request a part of the entity, specify the scope range:bytes=500-999
Referer The address of the previous page, which is immediately followed by the current request page, Referer:http://www.zcmhi.com/archives/71.html
TE The transmission encoding that the client is willing to accept. and notifies the server to accept the trailing header information te:trailers,deflate;q=0.5
Upgrade Specify a transport protocol to the server for the server to convert (assuming support) upgrade:http/2.0, shttp/1.3, irc/6.9, rta/x11
User-agent The content of the user-agent includes the user information that 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 About warning messages for message entities warn:199 Miscellaneous Warning
Requests Partial Header Explanation Demo sample
Accept Specify what type of content the client can receive accept:text/plain, text/html
Accept-charset The set of character encodings that the browser can Accept. Accept-charset:iso-8859-5
Accept-encoding Specifies the type of webserver return content compression encoding that the browser can Support. accept-encoding:compress, gzip
Accept-language Browser-acceptable language Accept-language:en,zh
Accept-ranges Ability to request one or more child range fields for 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 defaults to persistent Connection) Connection:close
Cookies When an HTTP request is Sent. All the cookie values stored under the requested domain name are sent to Webserver.

Cookie: $Version = 1; skin=new;
Content-length The requested content length content-length:348

HTTP Header Specific explanation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.