HTTP header fields are a list of strings sent and received by both the client program and server on every HTTP request and response. These headers are usually invisible to the end-user and are only processed or logged by the server and client applications. They define how information sent/received through the connection are encoded (as in Content-Encoding), the session verification and identification of the client (as in browser cookies, IP address, user-agent) or their anonymity thereof (VPN or proxy masking, user-agent spoofing), how the server should handle data (as in Do-Not-Track), the age (the time it has resided in a shared cache) of the document being downloaded, amongst others.
In HTTP version 1.x, header fields are transmitted after the request line (in case of a request HTTP message) or the response line (in case of a response HTTP message), which is the first line of a message. Header fields are colon-separated key-value pairs in clear-text string format, terminated by a carriage return (CR) and line feed (LF) character sequence. The end of the header section is indicated by an empty field line, resulting in the transmission of two consecutive CR-LF pairs. In the past, long lines could be folded into multiple lines; continuation lines are indicated by the presence of a space (SP) or horizontal tab (HT) as the first character on the next line. This folding was deprecated in RFC 7230.[1]
HTTP/2[2] and HTTP/3 instead use a binary protocol, where headers are encoded in a single HEADERS
and zero or more CONTINUATION
frames using HPACK[3] (HTTP/2) or QPACK (HTTP/3), which both provide efficient header compression. The request or response line from HTTP/1 has also been replaced by several pseudo-header fields, each beginning with a colon (:
).
A core set of fields is standardized by the Internet Engineering Task Force (IETF) in . The Field Names, Header Fields and Repository of Provisional Registrations are maintained by the IANA. Additional field names and permissible values may be defined by each application.
Header field names are case-insensitive.[4] This is in contrast to HTTP method names (GET, POST, etc.), which are case-sensitive.[5]
HTTP/2 makes some restrictions on specific header fields (see below).
Non-standard header fields were conventionally marked by prefixing the field name with X-
but this convention was deprecated in June 2012 because of the inconveniences it caused when non-standard fields became standard.[6] An earlier restriction on use of Downgraded-
was lifted in March 2013.[7]
A few fields can contain comments (i.e. in User-Agent, Server, Via fields), which can be ignored by software.[8]
Many field values may contain a quality (q) key-value pair separated by equals sign, specifying a weight to use in content negotiation.[9] For example, a browser may indicate that it accepts information in German or English, with German as preferred by setting the q value for de
higher than that of en
, as follows:
Accept-Language: de; q=1.0, en; q=0.5
The standard imposes no limits to the size of each header field name or value, or to the number of fields. However, most servers, clients, and proxy software impose some limits for practical and security reasons. For example, the Apache 2.3 server by default limits the size of each field to 8,190 bytes, and there can be at most 100 header fields in a single request.[10]
Name | Description | Example | Status | Standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A-IM | Acceptable instance-manipulations for the request.[11] | A-IM: feed | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Accept | Media type(s) that is/are acceptable for the response. See Content negotiation. | Accept: text/html | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Accept-Charset | Character sets that are acceptable. | Accept-Charset: utf-8 | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Accept-Datetime | Acceptable version in time. | Accept-Datetime: Thu, 31 May 2007 20:35:00 GMT | Provisional | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Accept-Encoding | List of acceptable encodings. See HTTP compression. | Accept-Encoding: gzip, deflate | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Accept-Language | List of acceptable human languages for response. See Content negotiation. | Accept-Language: en-US | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[12] | Initiates a request for cross-origin resource sharing with Origin (below). | Access-Control-Request-Method: GET | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Authorization | Authentication credentials for HTTP authentication. | Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Used to specify directives that must be obeyed by all caching mechanisms along the request-response chain. | Cache-Control: no-cache | Permanent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Connection | Control options for the current connection and list of hop-by-hop request fields.[13] Must not be used with HTTP/2.[14] | Connection: keep-alive [[HTTP/1.1 Upgrade header|Connection: Upgrade]] | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Content-Encoding | The type of encoding used on the data. See HTTP compression. | Content-Encoding: gzip | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Content-Length | The length of the request body in octets (8-bit bytes). | Content-Length: 348 | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Content-MD5 | A Base64-encoded binary MD5 sum of the content of the request body. | Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ== | Obsolete[15] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Content-Type | The Media type of the body of the request (used with POST and PUT requests). | Content-Type: application/x-www-form-urlencoded | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Cookie | An HTTP cookie previously sent by the server with [[#innerlink set-cookie|Set-Cookie]] (below). | Cookie: $Version=1; Skin=new; | Permanent: standard | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Date | The date and time at which the message was originated (in "HTTP-date" format as defined by RFC 9110: HTTP Semantics, section 5.6.7 "Date/Time Formats"). | Date: Tue, 15 Nov 1994 08:12:31 GMT | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Expect | Indicates that particular server behaviors are required by the client. | Expect: 100-continue | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Forwarded | Disclose original information of a client connecting to a web server through an HTTP proxy.[16] | Forwarded: for=192.0.2.60;proto=http;by=203.0.113.43 Forwarded: for=192.0.2.43, for=198.51.100.17 | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From | The email address of the user making the request. | From: user@example.com | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Host | The domain name of the server (for virtual hosting), and the TCP port number on which the server is listening. The port number may be omitted if the port is the standard port for the service requested.Mandatory since HTTP/1.1.[17] If the request is generated directly in HTTP/2, it should not be used.[18] | Host: en.wikipedia.org:8080 Host: en.wikipedia.org | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HTTP2-Settings | A request that upgrades from HTTP/1.1 to HTTP/2 MUST include exactly one HTTP2-Settings header field. The HTTP2-Settings header field is a connection-specific header field that includes parameters that govern the HTTP/2 connection, provided in anticipation of the server accepting the request to upgrade.[19] [20] | HTTP2-Settings: token64 | Obsolete | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If-Match | Only perform the action if the client supplied entity matches the same entity on the server. This is mainly for methods like PUT to only update a resource if it has not been modified since the user last updated it. | If-Match: "737060cd8c284d8af7ad3082f209582d" | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If-Modified-Since | Allows a 304 Not Modified to be returned if content is unchanged. | If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If-None-Match | Allows a 304 Not Modified to be returned if content is unchanged, see HTTP ETag. | If-None-Match: "737060cd8c284d8af7ad3082f209582d" | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If-Range | If the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity. | If-Range: "737060cd8c284d8af7ad3082f209582d" | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
style=white-space:nowrap | If-Unmodified-Since | Only send the response if the entity has not been modified since a specific time. | If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT | Permanent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Max-Forwards | Limit the number of times the message can be forwarded through proxies or gateways. | Max-Forwards: 10 | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Origin | Initiates a request for cross-origin resource sharing (asks server for Access-Control-* response fields). | Origin: <nowiki>http://www.example-social-network.com</nowiki> || Permanent: standard||-| Pragma || Implementation-specific fields that may have various effects anywhere along the request-response chain. || [[#Avoiding caching|Pragma: no-cache]] || Permanent||-|Prefer|Allows client to request that certain behaviors be employed by a server while processing a request.|Prefer: return=representation |Permanent||-| Proxy-Authorization || Authorization credentials for connecting to a proxy. || Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== || Permanent||- id="range-request-header"| Range || Request only part of an entity. Bytes are numbered from 0. See Byte serving. || Range: bytes=500-999 || Permanent||-| Referer || This is the address of the previous web page from which a link to the currently requested page was followed. (The word "referrer" has been misspelled in the RFC as well as in most implementations to the point that it has become standard usage and is considered correct terminology) || <nowiki>Referer: http://en.wikipedia.org/wiki/Main_Page</nowiki> || Permanent||- id="te-request-header"| TE || The transfer encodings the user agent is willing to accept: the same values as for the response header field Transfer-Encoding can be used, plus the "trailers" value (related to the "chunked" transfer method) to notify the server it expects to receive additional fields in the trailer after the last, zero-sized, chunk. Only trailers is supported in HTTP/2.|| TE: trailers, [[deflate]] || Permanent||-|Trailer|The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding.|Trailer: Max-Forwards |Permanent||-|Transfer-Encoding|The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity. Must not be used with HTTP/2.|Transfer-Encoding: chunked |Permanent||-|- id="user-agent-request-header"| User-Agent || The user agent string of the user agent. || User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0 || Permanent||-| Upgrade || Ask the server to upgrade to another protocol.Must not be used in HTTP/2.|| Upgrade: h2c, HTTPS/1.3, IRC/6.9, RTA/x11, websocket || Permanent||-| Via || Informs the server of proxies through which the request was sent. || Via: 1.0 fred, 1.1 example.com (Apache/1.1) || Permanent||-| Warning || A general warning about possible problems with the entity body. || Warning: 199 Miscellaneous warning || Obsolete[21] ||}Common non-standard request fields
Response fieldsStandard response fields
| Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
P3P | This field is supposed to set P3P policy, in the form of P3P:CP="your_compact_policy" . However, P3P did not take off,[54] most browsers have never fully implemented it, a lot of websites set this field with fake policy text, that was enough to fool browsers the existence of P3P policy and grant permissions for third party cookies. | P3P: CP="This is not a P3P policy! See <nowiki>https://en.wikipedia.org/wiki/Special:CentralAutoLogin/P3P</nowiki> for more info." | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Pragma | Implementation-specific fields that may have various effects anywhere along the request-response chain. | Pragma: no-cache | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Preference-Applied | Indicates which Prefer tokens were honored by the server and applied to the processing of the request. | Preference-Applied: return=representation | Permanent | RFC 7240 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Proxy-Authenticate | Request authentication to access the proxy. | Proxy-Authenticate: Basic | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public-Key-Pins[55] | HTTP Public Key Pinning, announces hash of website's authentic TLS certificate | Public-Key-Pins: max-age=2592000; pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g="; | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Retry-After | If an entity is temporarily unavailable, this instructs the client to try again later. Value could be a specified period of time (in seconds) or a HTTP-date.[56] |
| Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Server | A name for the server | Server: Apache/2.4.1 (Unix) | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set-Cookie | Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1 | Permanent: standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains. | Strict-Transport-Security: max-age=16070400; includeSubDomains | Permanent: standard | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Trailer | The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer coding. | Trailer: Max-Forwards | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transfer-Encoding | The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity. Must not be used with HTTP/2. | Transfer-Encoding: chunked | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tk | Tracking Status header, value suggested to be sent in response to a DNT(do-not-track), possible values: "!" — under construction "?" — dynamic "G" — gateway to multiple parties "N" — not tracking "T" — tracking "C" — tracking with consent "P" — tracking only if consented "D" — disregarding DNT "U" — updated | Tk: ? | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ask the client to upgrade to another protocol. Must not be used in HTTP/2 | Upgrade: h2c, HTTPS/1.3, IRC/6.9, RTA/x11, websocket | Permanent | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Vary | Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server. |
| Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Via | Informs the client of proxies through which the response was sent. | Via: 1.0 fred, 1.1 example.com (Apache/1.1) | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning | A general warning about possible problems with the entity body. | Warning: 199 Miscellaneous warning | Obsolete | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WWW-Authenticate | Indicates the authentication scheme that should be used to access the requested entity. | WWW-Authenticate: Basic | Permanent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
X-Frame-Options[57] | Clickjacking protection: deny - no rendering within a frame, sameorigin - no rendering if origin mismatch, allow-from - allow from specified location, allowall - non-standard, allow from any location | X-Frame-Options: deny | Obsolete[58] |
Field name | Description | Example | |
---|---|---|---|
Content-Security-Policy, X-Content-Security-Policy, X-WebKit-CSP[59] | Content Security Policy definition. | X-WebKit-CSP: default-src 'self' | |
Expect-CT[60] | Notify to prefer to enforce Certificate Transparency. | Expect-CT: max-age=604800, enforce, report-uri="https://example.example/report" | |
NEL[61] | Used to configure network request logging. | ||
Permissions-Policy[62] | To allow or disable different features or APIs of the browser. | Permissions-Policy: fullscreen=, camera=, microphone=, geolocation=, interest-cohort=<ref>{{cite web|url=https://amifloced.org/|title=Am I FLoCed?|publisher=EFF|year=2021|access-date=2021-05-01}}</ref> | |
Refresh | Tells the browser to refresh the page or redirect to a different URL, after a given number of seconds (0 meaning immediately); . Header introduced by Netscape in 1995 and became a de facto standard supported by most web browsers. Eventually standardized in the HTML Living Standard in 2017.[63] | Refresh: 5; url=<span class="plainlinks">http://www.w3.org/pub/WWW/People.html</span> | |
Report-To[64] | Instructs the user agent to store reporting endpoints for an origin. | ||
Status | CGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 9110.[65] | Status: 200 OK | |
Timing-Allow-Origin | The Timing-Allow-Origin response header specifies origins that are allowed to see values of attributes retrieved via features of the Resource Timing API, which would otherwise be reported as zero due to cross-origin restrictions.[66] | Timing-Allow-Origin: * Timing-Allow-Origin: <origin>[, <origin>]* | |
X-Content-Duration[67] | Provide the duration of the audio or video in seconds. Not supported by current browsers – the header was only supported by Gecko browsers, from which support was removed in 2015.[68] | X-Content-Duration: 42.666 | |
X-Content-Type-Options[69] | The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions.[70] | X-Content-Type-Options: nosniff [71] | |
X-Powered-By[72] | Specifies the technology (e.g. ASP.NET, PHP, JBoss) supporting the web application (version details are often in X-Runtime , X-Version , or X-AspNet-Version ) | X-Powered-By: PHP/5.4.0 | |
X-Redirect-By[73] | Specifies the component that is responsible for a particular redirect. | X-Redirect-By: WordPress X-Redirect-By: Polylang | |
X-Request-ID, X-Correlation-ID[74] | Correlates HTTP requests between a client and server. | X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5 | |
X-UA-Compatible[75] | Recommends the preferred rendering engine (often a backward-compatibility mode) to use to display the content. Also used to activate Chrome Frame in Internet Explorer. In HTML Standard, only the IE=edge value is defined.[76] | X-UA-Compatible: IE=edge X-UA-Compatible: IE=EmulateIE7 X-UA-Compatible: Chrome=1 | |
X-XSS-Protection[77] | Cross-site scripting (XSS) filter | X-XSS-Protection: 1; mode=block |
If a web server responds with Cache-Control: no-cache
then a web browser or other caching system (intermediate proxies) must not use the response to satisfy subsequent requests without first checking with the originating server (this process is called validation). This header field is part of HTTP version 1.1, and is ignored by some caches and browsers. It may be simulated by setting the Expires
HTTP version 1.0 header field value to a time earlier than the response time. Notice that no-cache is not instructing the browser or proxies about whether or not to cache the content. It just tells the browser and proxies to validate the cache content with the server before using it (this is done by using If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match attributes mentioned above). Sending a no-cache value thus instructs a browser or proxy to not use the cache contents merely based on "freshness criteria" of the cache content. Another common way to prevent old content from being shown to the user without validation is Cache-Control: max-age=0
. This instructs the user agent that the content is stale and should be validated before use.
The header field Cache-Control: no-store
is intended to instruct a browser application to make a best effort not to write it to disk (i.e not to cache it).
The request that a resource should not be cached is no guarantee that it will not be written to disk. In particular, the HTTP/1.1 definition draws a distinction between history stores and caches. If the user navigates back to a previous page a browser may still show you a page that has been stored on disk in the history store. This is correct behavior according to the specification. Many user agents show different behavior in loading pages from the history store or cache depending on whether the protocol is HTTP or HTTPS.
The Cache-Control: no-cache
HTTP/1.1 header field is also intended for use in requests made by the client. It is a means for the browser to tell the server and any intermediate caches that it wants a fresh version of the resource. The Pragma: no-cache
header field, defined in the HTTP/1.0 spec, has the same purpose. It, however, is only defined for the request header. Its meaning in a response header is not specified.[78] The behavior of Pragma: no-cache
in a response is implementation specific. While some user agents do pay attention to this field in responses,[79] the HTTP/1.1 RFC specifically warns against relying on this behavior.
HTTP Semantics
"IE=edge"
..