Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1129295 of HTTP headers

  • Revision slug: Web/HTTP/Headers
  • Revision title: HTTP headers
  • Revision id: 1129295
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

HTTP headers allow the client and the server to pass additional information with the request or the response. A request header consists of its case-insensitive name followed by a colon ':', then by its value (without line breaks). Leading white space before the value is ignored.

Custom proprietary headers can be added using the 'X-' prefix, but this convention was deprecated in June 2012, because of the inconveniences it caused when non-standard fields became standard in RFC 6648; others are listed in an IANA registry, whose original content was defined in RFC 4229. IANA also maintains a registry of proposed new HTTP message headers.

Headers can be grouped according to their contexts:

  • {{Glossary("General header")}}: Headers applying to both requests and responses but with no relation to the data eventually transmitted in the body.
  • {{Glossary("Request header")}}: Headers containing more information about the resource to be fetched or about the client itself.
  • {{Glossary("Response header")}}: Headers with additional information about the response, like its location or about the server itself (name and version etc.).
  • {{Glossary("Entity header")}}: Headers containing more information about the body of the entity, like its content length or its MIME-type.

Headers can also be grouped according to how proxies handle them:

End-to-end headers
These headers must be transmitted to the final recipient of the message; that is, the server for a request or the client for a response. Intermediate proxies must retransmit end-to-end headers unmodified and caches must store them.
Hop-by-hop headers
These headers are meaningful only for a single transport-level connection and must not be retransmitted by proxies or cached. Such headers are: {{ httpheader("Connection") }}, {{ httpheader("Keep-Alive") }}, {{ httpheader("Proxy-Authenticate") }}, {{ httpheader("Proxy-Authorization") }}, {{ httpheader("TE") }}, {{ httpheader("Trailer") }}, {{ httpheader("Transfer-Encoding") }} and {{ httpheader("Upgrade") }}. Note that only hop-by-hop headers may be set using the {{ httpheader("Connection") }} general header.

The following list summaries HTTP headers by their usage category. For an alphabetical list, see the navigation on the left side.

Authentication

{{HTTPHeader("WWW-Authenticate")}}
...
{{HTTPHeader("Authorization")}}
...
{{HTTPHeader("Proxy-Authenticate")}}
...
{{HTTPHeader("Proxy-Authorization")}}
...

Caching

{{HTTPHeader("Age")}}
The time in seconds the object has been in a proxy cache.
{{HTTPHeader("Cache-Control")}}
Specifies directives for caching mechanisms in both, requests and responses.
{{HTTPHeader("Expires")}}
The date/time after which the response is considered stale.
{{HTTPHeader("Pragma")}}
Implementation-specific header that may have various effects anywhere along the request-response chain. Used for backwards compatibility with HTTP/1.0 caches where the Cache-Control header is not yet present.
{{HTTPHeader("Warning")}}
A general warning field containing information about possible problems.

Client hints

{{HTTPHeader("Accept-CH")}}
...
{{HTTPHeader("Content-DPR")}}
...
{{HTTPHeader("DPR")}}
...
{{HTTPHeader("Downlink")}}
...
{{HTTPHeader("Save-Data")}}
...
{{HTTPHeader("Viewport-Width")}}
...
{{HTTPHeader("Width")}}
...

Conditionals

{{HTTPHeader("Last-Modified")}}
It is a validator, the last modification date of the resource, used to compare several versions of the same resource. It is less accurate than {{HTTPHeader("ETag")}}, but easier to calculate in some environments. Conditional requests using {{HTTPHeader("If-Modified-Since")}} and {{HTTPHeader("If-Unmodified-Since")}} use this value to change the behavior of the request.
{{HTTPHeader("ETag")}}
It is a validator, a unique string identifying the version of the resource. Conditional requests using {{HTTPHeader("If-Match")}} and {{HTTPHeader("If-None-Match")}} use this value to change the behavior of the request.
{{HTTPHeader("If-Match")}}
Makes the request conditional and applies the method only if the stored resource matches one of the given ETags.
{{HTTPHeader("If-None-Match")}}
Makes the request conditional and applies the method only if the stored resource doesn't match any of the given ETags. This is used to update caches (for safe requests), or to prevent to upload a new resource when one is already existing.
{{HTTPHeader("If-Modified-Since")}}
Makes the request conditional and expects the entity to be transmitted only if it has been modified after the given date. This is used to transmit data only when the cache is out of date.
{{HTTPHeader("If-Unmodified-Since")}}
Makes the request conditional and expects the entity to be transmitted only if it has not been modified after the given date. This is used to ensure the coherence of a new fragment of a specific range with previous ones, or to implement an optimistic concurrency control system when modifying existing documents.

Connection management

{{HTTPHeader("Connection")}}
Controls whether or not the network connection stays open after the current transaction finishes.
{{HTTPHeader("Keep-Alive")}}
Controls how long a persistent connection should stay open.

Content negotiation

{{HTTPHeader("Accept")}}
Informs the server about the types of data that can be sent back. It is MIME-type.
{{HTTPHeader("Accept-Charset")}}
Informs the server about which character set the client is able to understand.
{{HTTPHeader("Accept-Encoding")}}
Informs the server about the encoding algorithm, usually a compression algorithm, that can be used on the resource sent back.
{{HTTPHeader("Accept-Language")}}
Informs the server about the language the server is expected to send back. This is a hint and is not necessarily under the full control of the user: the server should always pay attention not to override an explicit user choice (like selecting a language in a drop down list).

Content security policy (CSP)

{{HTTPHeader("Content-Security-Policy")}}
Controls resources the user agent is allowed to load for a given page.
{{HTTPHeader("Content-Security-Policy-Report-Only")}}
...

Controls

{{HTTPHeader("Expect")}}
...
{{HTTPHeader("Max-Forwards")}}
...

Cookies

{{HTTPHeader("Cookie")}}
Contains stored HTTP cookies previously sent by the server with the {{HTTPHeader("Set-Cookie")}} header.
{{HTTPHeader("Set-Cookie")}}
Send cookies from the server to the user agent.
{{HTTPHeader("Cookie2")}} {{obsolete_inline}}
Used to contain an HTTP cookie, previously sent by the server with the {{HTTPHeader("Set-Cookie2")}} header, but has been obsoleted by the specification. Use {{HTTPHeader("Cookie")}} instead.
{{HTTPHeader("Set-Cookie2")}} {{obsolete_inline}}
Used to send cookies from the server to the user agent, but has been obsoleted by the specification. Use {{HTTPHeader("Set-Cookie")}} instead.

CORS

{{HTTPHeader("Access-Control-Allow-Origin")}}
Indicates whether the response can be shared.
{{HTTPHeader("Access-Control-Allow-Credentials")}}
...
{{HTTPHeader("Access-Control-Expose-Headers")}}
Indicates which headers can be exposed as part of the response by listing their names.
{{HTTPHeader("Access-Control-Allow-Headers")}}
Used in response to a preflight request to indicate which HTTP headers can be used when making the actual request.
{{HTTPHeader("Access-Control-Allow-Methods")}}
Specifies the method or methods allowed when accessing the resource in response to a preflight request.
{{HTTPHeader("Access-Control-Max-Age")}}
...
{{HTTPHeader("Access-Control-Request-Method")}}
...
{{HTTPHeader("Access-Control-Request-Headers")}}
...
{{HTTPHeader("Origin")}}
Indicates where a fetch originates from.

Do Not Track

{{HTTPHeader("DNT")}}
...

Downloads

{{HTTPHeader("Content-Disposition")}}
Is a response header if the ressource transmitted should be displayed inline (default behavior when the header is not present), or it should be handled like a download and the browser should present a 'Save As' window.

HSTS

{{HTTPHeader("Strict-Transport-Security")}}
...

Message body information

{{HTTPHeader("Content-Length")}}
indicates the size of the entity-body, in decimal number of octets, sent to the recipient.
{{HTTPHeader("Content-Type")}}
Indicates the media type of the resource.
{{HTTPHeader("Content-Encoding")}}
Used to specify the compression algorithm.
{{HTTPHeader("Content-Language")}}
Describes the language(s) intended for the audience, so that it allows a user to differentiate according to the users' own preferred language.
{{HTTPHeader("Content-Location")}}
Indicates an alternate location for the returned data.

Message routing

{{HTTPHeader("Via")}}
Added by proxies, both forward and reverse proxies, and can appear in the request headers and the response headers.

Redirects

{{HTTPHeader("Location")}}
Indicates the URL to redirect a page to.

Request context

{{HTTPHeader("From")}}
Contains an Internet email address for a human user who controls the requesting user agent.
{{HTTPHeader("Host")}}
Specifies the domain name of the server (for virtual hosting), and (optionally) the TCP port number on which the server is listening.
{{HTTPHeader("Referer")}}
The address of the previous web page from which a link to the currently requested page was followed.
{{HTTPHeader("Referrer-Policy")}}
Governs which referrer information sent in the {{HTTPHeader("Referer")}} header should be included with requests made.
{{HTTPHeader("User-Agent")}}
Contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent. See also the Firefox user agent string reference.

Response context

{{HTTPHeader("Allow")}}
...
{{HTTPHeader("Server")}}
Contains information about the software used by the origin server to handle the request.

Range requests

{{HTTPHeader("Accept-Ranges")}}
Indicates if the server supports range requests and, if so, in which unit the range can be expressed.
{{HTTPHeader("Range")}}
...
{{HTTPHeader("If-Range")}}
Create a conditional range request that is only fulfilled if the etag or date given in parameter match the remote resource. Used to prevent downloading two ranges from incompatible version of the resource.
{{HTTPHeader("Content-Range")}}
...

Server-sent events

{{HTTPHeader("Ping-From")}}
...
{{HTTPHeader("Ping-To")}}
...
{{HTTPHeader("Last-Event-ID")}}
...

Transfer coding

{{HTTPHeader("Transfer-Encoding")}}
Specifies the the form of encoding used to safely transfer the entity to the user.
{{HTTPHeader("TE")}}
Specifies the transfer encodings the user agent is willing to accept.
{{HTTPHeader("Trailer")}}
Allows the sender to include additional fields at the end of chunked message.

WebSockets

{{HTTPHeader("Sec-WebSocket-Key")}}
...
{{HTTPHeader("Sec-WebSocket-Extensions")}}
...
{{HTTPHeader("Sec-WebSocket-Accept")}}
...
{{HTTPHeader("Sec-WebSocket-Protocol")}}
...
{{HTTPHeader("Sec-WebSocket-Version")}}
...

Other

{{HTTPHeader("Date")}}
Contains the date and time at which the message was originated.
{{HTTPHeader("Link")}}
...
{{HTTPHeader("Retry-After")}}
Indicates how long the user agent should wait before making a follow-up request.
{{HTTPHeader("Upgrade")}}
This is a Proposed Internet Standard. To view a comprehensive list of all Official and Proposed Internet Standards with detailed information about each, visit this Internet Standards reference, which is updated daily.  The relevant RFC document for the Upgrade header field standard is RFC 7230, section 6.7.  The standard establishes rules for upgrading or changing to a different protocol on the current client, server, transport protocol connection.  For example, this header standard allows a client to change from HTTP 1.1 to HTTP 2.0, assuming the server decides to acknowledge and implement the Upgrade header field.  Niether party is required to accept the terms specified in the Upgrade header field.  It can be used in both client and server headers.  If the Upgrade header field is specified, then the sender MUST also send the Connection header field with the upgrade option specified.  For details on the Connection header field please see section 6.1 of the aforementioned RFC.
{{HTTPHeader("Vary")}}
Determines how to match future request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server.
{{HTTPHeader("X-Frame-Options")}}
Indicates whether or not a browser should be allowed to render a page in a {{HTMLElement("frame")}}, {{HTMLElement("iframe")}} or {{HTMLElement("object")}}.
{{HTTPHeader("X-Content-Type-Options")}}
Disables MIME sniffing and forces browser to use the type given in {{HTTPHeader("Content-Type")}}.
{{HTTPHeader("X-UA-Compatible")}}
...
{{HTTPHeader("X-DNS-Prefetch-Control")}}
...
{{HTTPHeader("X-Content-Duration")}}
...
{{HTTPHeader("X-Requested-With")}}
...

Browser compatibility

{{Compat}}

See also

Revision Source

<div>{{HTTPSidebar}}</div>

<p>HTTP headers allow the client and the server to pass additional information with the request or the response. A request header consists of its case-insensitive name followed by a colon '<code>:</code>', then by its value (without line breaks). Leading white space before the value is ignored.</p>

<p>Custom proprietary headers can be added using the 'X-' prefix, but this convention was deprecated in June 2012, because of the inconveniences it caused when non-standard fields became standard in <a href="https://tools.ietf.org/html/rfc6648">RFC 6648</a>; others are listed in an <a class="external" href="https://www.iana.org/assignments/message-headers/perm-headers.html">IANA registry</a>, whose original content was defined in <a class="external" href="https://tools.ietf.org/html/rfc4229">RFC 4229</a>. IANA also maintains a <a class="external" href="https://www.iana.org/assignments/message-headers/prov-headers.html">registry of proposed new HTTP&nbsp;message headers</a>.</p>

<p>Headers can be grouped according to their contexts:</p>

<ul>
 <li>{{Glossary("General header")}}: Headers applying to both requests and responses but with no relation to the data eventually transmitted in the body.</li>
 <li>{{Glossary("Request header")}}: Headers containing more information about the resource to be fetched or about the client itself.</li>
 <li>{{Glossary("Response header")}}: Headers with additional information about the response, like its location or about the server itself (name and version etc.).</li>
 <li>{{Glossary("Entity header")}}: Headers containing more information about the body of the entity, like its content length or its MIME-type.</li>
</ul>

<p>Headers can also be grouped according to how proxies handle them:</p>

<dl>
 <dt><a id="e2e" name="e2e"></a>End-to-end headers</dt>
 <dd>These headers must be transmitted to the final recipient of the message; that is, the server for a request or the client for a response. Intermediate proxies must retransmit end-to-end headers unmodified and caches must store them.</dd>
 <dt><a id="hbh" name="hbh"></a>Hop-by-hop headers</dt>
 <dd>These headers are meaningful only for a single transport-level connection and must not be retransmitted by proxies or cached. Such headers are: {{ httpheader("Connection") }}, {{ httpheader("Keep-Alive") }}, {{ httpheader("Proxy-Authenticate") }}, {{ httpheader("Proxy-Authorization") }}, {{ httpheader("TE") }}, {{ httpheader("Trailer") }}, {{ httpheader("Transfer-Encoding") }} and {{ httpheader("Upgrade") }}. Note that only hop-by-hop headers may be set using the {{ httpheader("Connection") }} general header.</dd>
</dl>

<p>The following list summaries HTTP headers by their usage category. For an alphabetical list, see the navigation on the left side.</p>

<h2 id="Authentication">Authentication</h2>

<dl>
 <dt>{{HTTPHeader("WWW-Authenticate")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Authorization")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Proxy-Authenticate")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Proxy-Authorization")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Caching">Caching</h2>

<dl>
 <dt>{{HTTPHeader("Age")}}</dt>
 <dd>The time in seconds the object has been in a proxy cache.</dd>
 <dt>{{HTTPHeader("Cache-Control")}}</dt>
 <dd>Specifies directives for caching mechanisms in both, requests and responses.</dd>
 <dt>{{HTTPHeader("Expires")}}</dt>
 <dd>The date/time after which the response is considered stale.</dd>
 <dt>{{HTTPHeader("Pragma")}}</dt>
 <dd>Implementation-specific header that may have various effects anywhere along the request-response chain. Used for backwards compatibility with HTTP/1.0 caches where the <code>Cache-Control</code> header is not yet present.</dd>
 <dt>{{HTTPHeader("Warning")}}</dt>
 <dd>A general warning field containing information about possible problems.</dd>
</dl>

<h2 id="Client_hints">Client hints</h2>

<dl>
 <dt>{{HTTPHeader("Accept-CH")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Content-DPR")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("DPR")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Downlink")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Save-Data")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Viewport-Width")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Width")}}</dt>
 <dd>...</dd>
</dl>

<dl>
 <dt>
 <h2 id="Conditionals">Conditionals</h2>
 </dt>
 <dt>{{HTTPHeader("Last-Modified")}}</dt>
 <dd>It is a validator, the last modification date of the resource, used to compare several versions of the same resource. It is less accurate than {{HTTPHeader("ETag")}}, but easier to calculate in some environments. Conditional requests using {{HTTPHeader("If-Modified-Since")}} and {{HTTPHeader("If-Unmodified-Since")}} use this value to change the behavior of the request.</dd>
 <dt>{{HTTPHeader("ETag")}}</dt>
 <dd>It is a validator, a unique string identifying the version of the resource. Conditional requests using {{HTTPHeader("If-Match")}} and {{HTTPHeader("If-None-Match")}} use this value to change the behavior of the request.</dd>
 <dt>{{HTTPHeader("If-Match")}}</dt>
 <dd>Makes the request conditional and applies the method only if the stored resource matches one of the given ETags.</dd>
 <dt>{{HTTPHeader("If-None-Match")}}</dt>
 <dd>Makes the request conditional and applies the method only if the stored resource doesn't match any of the given ETags. This is used to update caches (for safe requests), or to prevent to upload a new resource when one is already existing.</dd>
 <dt>{{HTTPHeader("If-Modified-Since")}}</dt>
 <dd>Makes the request conditional and expects the entity to be transmitted only if it has been modified after the given date. This is used to transmit data only when the cache is out of date.</dd>
 <dt>{{HTTPHeader("If-Unmodified-Since")}}</dt>
 <dd>Makes the request conditional and expects the entity to be transmitted only if it has not been modified after the given date. This is used to ensure the coherence of a new fragment of a specific range with previous ones, or to implement an optimistic concurrency control system when modifying existing documents.</dd>
</dl>

<h2 id="Connection_management">Connection management</h2>

<dl>
 <dt>{{HTTPHeader("Connection")}}</dt>
 <dd>Controls whether or not the network connection stays open after the current transaction finishes.</dd>
 <dt>{{HTTPHeader("Keep-Alive")}}</dt>
 <dd>Controls how long a persistent connection should stay open.</dd>
</dl>

<h2 id="Content_negotiation">Content negotiation</h2>

<dl>
 <dt>{{HTTPHeader("Accept")}}</dt>
 <dd>Informs the server about the types of data that can be sent&nbsp;back. It is MIME-type.</dd>
 <dt>{{HTTPHeader("Accept-Charset")}}</dt>
 <dd>Informs the server about which character set the client is able to understand.</dd>
 <dt>{{HTTPHeader("Accept-Encoding")}}</dt>
 <dd>Informs the server about the encoding algorithm, usually a compression algorithm, that can be used on the resource sent back.</dd>
 <dt>{{HTTPHeader("Accept-Language")}}</dt>
 <dd>Informs the server about the language the server is expected to send back. This is a hint and is not necessarily under the full control of the user: the server should always pay attention not to override an explicit user choice (like selecting a language in a drop down list).</dd>
</dl>

<h2 id="Content_security_policy_(CSP)">Content security policy (CSP)</h2>

<dl>
 <dt>{{HTTPHeader("Content-Security-Policy")}}</dt>
 <dd>Controls resources the user agent is allowed to load for a given page.</dd>
 <dt>{{HTTPHeader("Content-Security-Policy-Report-Only")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Controls">Controls</h2>

<dl>
 <dt>{{HTTPHeader("Expect")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Max-Forwards")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Cookies">Cookies</h2>

<dl>
 <dt>{{HTTPHeader("Cookie")}}</dt>
 <dd>Contains stored <a href="/en-US/docs/Web/HTTP/Cookies">HTTP cookies</a> previously sent by the server with the {{HTTPHeader("Set-Cookie")}} header.</dd>
 <dt>{{HTTPHeader("Set-Cookie")}}</dt>
 <dd>Send cookies from the server to the user agent.</dd>
 <dt>{{HTTPHeader("Cookie2")}} {{obsolete_inline}}</dt>
 <dd>Used to contain an HTTP cookie, previously sent by the server with the {{HTTPHeader("Set-Cookie2")}} header, but has been obsoleted by the specification. Use {{HTTPHeader("Cookie")}} instead.</dd>
 <dt>{{HTTPHeader("Set-Cookie2")}} {{obsolete_inline}}</dt>
 <dd>Used to send cookies from the server to the user agent, but has been obsoleted by the specification. Use {{HTTPHeader("Set-Cookie")}} instead.</dd>
 <dt>
 <h2 id="CORS">CORS</h2>
 </dt>
 <dt>{{HTTPHeader("Access-Control-Allow-Origin")}}</dt>
 <dd>Indicates whether the response can be shared.</dd>
 <dt>{{HTTPHeader("Access-Control-Allow-Credentials")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Access-Control-Expose-Headers")}}</dt>
 <dd>Indicates which headers can be exposed as part of the response by listing their names.</dd>
 <dt>{{HTTPHeader("Access-Control-Allow-Headers")}}</dt>
 <dd>Used in response to a preflight request to indicate which HTTP&nbsp;headers can be used when making the actual request.</dd>
 <dt>{{HTTPHeader("Access-Control-Allow-Methods")}}</dt>
 <dd>Specifies the method or methods allowed when accessing the resource in response to a preflight request.</dd>
 <dt>{{HTTPHeader("Access-Control-Max-Age")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Access-Control-Request-Method")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Access-Control-Request-Headers")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Origin")}}</dt>
 <dd>Indicates where a fetch originates from.</dd>
</dl>

<h2 id="Do_Not_Track">Do Not Track</h2>

<dl>
 <dt>{{HTTPHeader("DNT")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Downloads">Downloads</h2>

<dl>
 <dt>{{HTTPHeader("Content-Disposition")}}</dt>
 <dd>Is a response header if the ressource transmitted should be displayed inline (default behavior when the header is not present), or it should be handled like a download and the browser should present a 'Save As' window.</dd>
</dl>

<h2 id="HSTS">HSTS</h2>

<dl>
 <dt>{{HTTPHeader("Strict-Transport-Security")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Message_body_information">Message body information</h2>

<dl>
 <dt>{{HTTPHeader("Content-Length")}}</dt>
 <dd>indicates the size of the entity-body, in decimal number of octets, sent to the recipient.</dd>
 <dt>{{HTTPHeader("Content-Type")}}</dt>
 <dd>Indicates the media type of the resource.</dd>
 <dt>{{HTTPHeader("Content-Encoding")}}</dt>
 <dd>Used to specify the compression algorithm.</dd>
 <dt>{{HTTPHeader("Content-Language")}}</dt>
 <dd>Describes the language(s) intended for the audience, so that it allows a user to differentiate according to the users' own preferred language.</dd>
 <dt>{{HTTPHeader("Content-Location")}}</dt>
 <dd>Indicates an alternate location for the returned data.</dd>
</dl>

<h2 id="Message_routing">Message routing</h2>

<dl>
 <dt>{{HTTPHeader("Via")}}</dt>
 <dd>Added by proxies, both forward and reverse proxies, and can appear in the request headers and the response headers.</dd>
</dl>

<h2 id="Redirects">Redirects</h2>

<dl>
 <dt>{{HTTPHeader("Location")}}</dt>
 <dd>Indicates the URL to redirect a page to.</dd>
</dl>

<h2 id="Request_context">Request context</h2>

<dl>
 <dt>{{HTTPHeader("From")}}</dt>
 <dd>Contains an Internet email address for a human user who controls the requesting user agent.</dd>
 <dt>{{HTTPHeader("Host")}}</dt>
 <dd>Specifies the domain name of the server (for virtual hosting), and (optionally) the TCP port number on which the server is listening.</dd>
 <dt>{{HTTPHeader("Referer")}}</dt>
 <dd>The address of the previous web page from which a link to the currently requested page was followed.</dd>
 <dt>{{HTTPHeader("Referrer-Policy")}}</dt>
 <dd>Governs which referrer information sent in the {{HTTPHeader("Referer")}} header should be included with requests made.</dd>
 <dt>{{HTTPHeader("User-Agent")}}</dt>
 <dd>Contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent. See also the <a href="/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox">Firefox user agent string reference</a>.</dd>
</dl>

<h2 id="Response_context">Response context</h2>

<dl>
 <dt>{{HTTPHeader("Allow")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Server")}}</dt>
 <dd>Contains information about the software used by the origin server to handle the request.</dd>
</dl>

<h2 id="Range_requests">Range requests</h2>

<dl>
 <dt>{{HTTPHeader("Accept-Ranges")}}</dt>
 <dd>Indicates if the server supports range requests and, if so, in which unit the range can be expressed.</dd>
 <dt>{{HTTPHeader("Range")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("If-Range")}}</dt>
 <dd>Create a conditional range request that is only fulfilled if the etag or date given in parameter match the remote resource. Used to prevent downloading two ranges from incompatible version of the resource.</dd>
 <dt>{{HTTPHeader("Content-Range")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Server-sent_events">Server-sent events</h2>

<dl>
 <dt>{{HTTPHeader("Ping-From")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Ping-To")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Last-Event-ID")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Transfer_coding">Transfer coding</h2>

<dl>
 <dt>{{HTTPHeader("Transfer-Encoding")}}</dt>
 <dd>Specifies the the form of encoding used to safely transfer the entity to the user.</dd>
 <dt>{{HTTPHeader("TE")}}</dt>
 <dd>Specifies the transfer encodings the user agent is willing to accept.</dd>
 <dt>{{HTTPHeader("Trailer")}}</dt>
 <dd>Allows the sender to include additional fields at the end of chunked message.</dd>
</dl>

<h2 id="WebSockets">WebSockets</h2>

<dl>
 <dt>{{HTTPHeader("Sec-WebSocket-Key")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Sec-WebSocket-Extensions")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Sec-WebSocket-Accept")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Sec-WebSocket-Protocol")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Sec-WebSocket-Version")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Other">Other</h2>

<dl>
 <dt>{{HTTPHeader("Date")}}</dt>
 <dd>Contains the date and time at which the message was originated.</dd>
 <dt>{{HTTPHeader("Link")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("Retry-After")}}</dt>
 <dd>Indicates how long the user agent should wait before making a follow-up request.</dd>
 <dt>{{HTTPHeader("Upgrade")}}</dt>
 <dd>This is a Proposed Internet Standard. To view a comprehensive list of all Official and Proposed Internet Standards with detailed information about each, <a href="https://www.rfc-editor.org/standards">visit this Internet Standards reference</a>, which is updated daily.&nbsp; The relevant RFC document for the <a href="https://tools.ietf.org/html/rfc7230#section-6.7">Upgrade header field standard is RFC 7230, section 6.7</a>.&nbsp; The standard establishes rules for upgrading or changing to a different protocol on the current client, server, transport protocol connection.&nbsp; For example, this header standard allows a client to change from HTTP 1.1 to HTTP 2.0, assuming the server decides to acknowledge and implement the Upgrade header field.&nbsp; Niether party is required to accept the terms specified in the Upgrade header field.&nbsp; It can be used in both client and server headers.&nbsp;&nbsp;If the Upgrade header field is specified, then the sender MUST also send the Connection header field with the upgrade option specified.&nbsp; For details on the Connection header field <a href="https://tools.ietf.org/html/rfc7230#section-6.1">please see section 6.1 of the aforementioned RFC</a>.</dd>
 <dt>{{HTTPHeader("Vary")}}</dt>
 <dd>Determines how to match future request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server.</dd>
 <dt>{{HTTPHeader("X-Frame-Options")}}</dt>
 <dd>Indicates whether or not a browser should be allowed to render a page in a {{HTMLElement("frame")}}, {{HTMLElement("iframe")}} or {{HTMLElement("object")}}.</dd>
 <dt>{{HTTPHeader("X-Content-Type-Options")}}</dt>
 <dd>Disables MIME sniffing and forces browser to use the type given in {{HTTPHeader("Content-Type")}}.</dd>
 <dt>{{HTTPHeader("X-UA-Compatible")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("X-DNS-Prefetch-Control")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("X-Content-Duration")}}</dt>
 <dd>...</dd>
 <dt>{{HTTPHeader("X-Requested-With")}}</dt>
 <dd>...</dd>
</dl>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">To contribute to this compatibility data, please write a pull request against this file: <a href="https://github.com/mdn/browser-compat-data/blob/master/http/headers.json">https://github.com/mdn/browser-compat-data/blob/master/http/headers.json</a>.</p>

<p>{{Compat}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="https://en.wikipedia.org/wiki/List_of_HTTP_header_fields">Wikipedia page on List of HTTP headers</a></li>
 <li><a href="https://www.iana.org/assignments/message-headers/perm-headers.html">IANA registry</a></li>
</ul>
Revert to this revision