HTTP header information

Source: Internet
Author: User

HTTP header information
The header information is composed of "key: value. They describe the properties of the client or server, the transferred resources, and the connection to the server.

Four different types of header labels

General header: it can be used for requests or responses, and is associated with transactions as a whole rather than a specific resource.
Request Header: allows the client to pass information about itself and the desired response form.
Response Header: the server and the response that transmits its own information.
Object Header: defines the information of the transferred resource. Can be used for requests or responses.

Header Format: <name >:< value> <CRLF>

Accept

Defines the media types that can be processed by the client. */* indicates any type, and type/* indicates all child types of this type.

Accept-charset

Define character sets that can be processed by the client

Accept-Encoding

Defines the encoding mechanism that the client can understand. It usually specifies the compression method, whether compression is supported, and what compression methods (gzip, deflate) are supported)

Accept-Language

Defines the list of natural languages that the client is willing to accept. Example: Accept-language: En, de

Accept-ranges

Indicates whether the Web Server accepts a request to obtain a part of an object (such as a part of a file) (Bytes: Indicates accept, none: Indicates not accept)

Age

When the contemporary server uses its own cached entities to respond to requests, it uses this header to indicate how long the entity has elapsed since it was generated, in seconds.

Authorization

When the client receives the WWW-authenticate response from the Web server, it uses this header to respond to its authentication information to the web server.

Cache-control

A general header used to define cache commands.

Connection
Indicates whether to save the General header information that the socket connection is open.
Example: keep-alive: 300

Content-Encoding

The Web server shows the compression method (gzip, deflate) used to compress the objects in the response.

Content-language

The Web server tells the browser the language of the response object.

Content-Length

The Web server tells the browser the length of the response object.

Content-Range

The Web server indicates the part of the entire object contained in the response.

Content-Type

The Web server informs the browser of the type of the response object.

Date

The date and time when the HTTP message was sent.

Etag

It is the flag value of an object (such as a URL). The role of etag is similar to that of last-modified, mainly for the Web server to determine whether an object has changed.

Expired

The Web server indicates when the object will expire. expired objects can be used to respond to customer requests only after they are verified with the Web server.

Host

The Host Name of the requested resource. This domain is mandatory for requests that use HTTP/1.1.

If-match

If the etag of the object is not changed, it means that the request action is executed only when the object is not changed.

If-None-match

If the etag of an object changes, the request action is executed only when the object changes.

If-modified-since

If the requested object is modified after the specified time in the header, the requested action (for example, the returned object) will be executed. Otherwise, code 304 will be returned, notifying the browser that the object has not been modified.

If-Range

The browser tells the web server that if the requested object does not change, it will give me the missing part. If the object changes, it will give me the whole object. The browser sends the request object's etag or the last modification time it knows to the Web server to determine whether the object has changed and must be used with the range header.

Last-modified

The Web server determines the last modification time of an object, such as the last modification time of a file and the last generation time of a dynamic page.

Location

The Web server tells the browser that the object to be accessed has been moved to another location and retrieved from the specified position in the header.

Pramga

A common header that sends implementation-related information, mainly using pramga: No-cache, which is equivalent to cache-control: No-cache.

Proxy-Authenticate

The proxy server responds to the browser and requires it to provide Proxy authentication information.

Proxy-Authorization

The browser responds to the authentication request of the proxy server and provides its own identity information.

Range

When a browser (such as flash get multi-thread download) tells the Web server what part of the object it wants.

Referer

The browser indicates to the web server which webpage/URL it obtains/clicks the URL/URL in the current request.

Server

The Web server indicates the software and version.

User-Agent

The browser indicates your identity (which browser or other information is used ).

Transfer-encodin

The Web server indicates the encoding of the Response Message Body (not an object in the message body), such as whether to block the message body.

Vary

The Web server uses the content in this header to inform the cache server of the conditions under which the returned object can be used to respond to subsequent requests.

Via

Lists the proxy servers from the client to the OCs or the opposite, and the Protocols (and versions) they use to send requests.

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.