What are the HTTP headers for?

Source: Internet
Author: User

Request Header

1. Accept Header

The Accept header provides a way for clients to tell their preferences and capabilities to the server, including what they want, what they can use, and, most importantly, what they don't want. The Accept header will benefit both ends of the connection, the client will get what they want, and the server will not waste its time and bandwidth to send something that the client cannot use.

Accept tells the server which media types to send

Accept-charset tell the server which strings to send

Accept-encoding tell the server which encoding to send

Accept-language tell the server which languages to send

2. Conditional Request Header

Sometimes the client wants to add some restrictions to the request

Expect allows clients to list the server behavior required by a request

If-match if the entity tag matches the previous one, get the document

If-modified-since is modified after a specified date, the server transmits the resource, otherwise it gets from the cache

If-none-match is the opposite of If-match.

If-range allows conditional requests to a range of documents

3. Security Header Request

Require the client to authenticate itself before acquiring a specific resource

Authorization Login Required

Cookie Tokens

Response header

Informational header of the response

Age response Duration

Request methods supported by the Public server resource

Retry-after if the resource is not available, retry on this date

Name and version of the server application software

Title HTML document title

Warning warning message

1. Negotiation Header

Accept-range types of scopes that the server can receive

The Vary contains a list of other headers that can be placed into the header by the passing agent

2. Security response Header

Response side of the HTTP Challenge/response authentication mechanism

Proxy-authenticate the list of challenges from the agent to the client

Set-cookie set a token on the client so that the server identifies the client

Www-authenticate

Entity Header

Describe the state of the entity, what type,

Allow lists the request methods that can be performed on this entity

Location tells the client where the entity is actually located

1. Content Header

Provides specific information about the entity's content

Content-base the underlying URL to use when parsing relative URLs in the body

Content-encoding Body Coding Method

Content-length Body Content Length

Content-location where the resource is actually located

The byte range represented by the Content-range entity

Content-type Object Type

2. Entity Cache Header

Etag

Expires entity cache is invalidated, date and time to retrieve the entity again

Last-modified the date and time that this entity was last modified

What are the HTTP headers for?

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.