List of HTTP header fields


HTTP header fields are components of the header section of request and response messages in the Hypertext Transfer Protocol. They define the operating parameters of an HTTP transaction.

General format

The header fields are transmitted after the request line or the response line, 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 and line feed 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 or horizontal tab as the first character on the next line. This folding is now deprecated.

Field names

A core set of fields is standardized by the Internet Engineering Task Force in RFCs 7230, 7231, 7232, 7233, 7234, and 7235. The and are maintained by the IANA. Additional field names and permissible values may be defined by each application.
Header field names are case-insensitive. This is in contrast to HTTP method names, which are case-sensitive.
HTTP/2 makes some restrictions on specific header fields.
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. An earlier restriction on use of Downgraded- was lifted in March 2013.

Field values

A few fields can contain comments, which can be ignored by software.
Many field values may contain a quality key-value pair separated by equals sign, specifying a weight to use in content negotiation. 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

Size limits

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.

Request fields

Standard request fields

Common non-standard request fields

Field nameDescriptionExample
Tells a server which hosts mixed content that the client would prefer redirection to HTTPS and can handle Content-Security-Policy: upgrade-insecure-requests
Must not be used with HTTP/2
Upgrade-Insecure-Requests: 1
X-Requested-WithMainly used to identify Ajax requests ; also identifies Android apps using WebView X-Requested-With: XMLHttpRequest
DNTRequests a web application to disable their tracking of a user. This is Mozilla's version of the X-Do-Not-Track header field. Safari and IE9 also have support for this field. On March 7, 2011, a draft proposal was submitted to IETF. The W3C Tracking Protection Working Group is producing a specification.DNT: 1
DNT: 0
X-Forwarded-ForA de facto standard for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer. Superseded by Forwarded header. X-Forwarded-For: client1, proxy1, proxy2
X-Forwarded-For: 129.78.138.66, 129.78.64.103
X-Forwarded-HostA de facto standard for identifying the original host requested by the client in the Host HTTP request header, since the host name and/or port of the reverse proxy may differ from the origin server handling the request. Superseded by Forwarded header.X-Forwarded-Host: en.wikipedia.org:8080
X-Forwarded-Host: en.wikipedia.org
X-Forwarded-ProtoA de facto standard for identifying the originating protocol of an HTTP request, since a reverse proxy may communicate with a web server using HTTP even if the request to the reverse proxy is HTTPS. An alternative form of the header is used by Google clients talking to Google servers. Superseded by Forwarded header.X-Forwarded-Proto: https
Front-End-HttpsNon-standard header field used by Microsoft applications and load-balancersFront-End-Https: on
X-Http-Method-OverrideRequests a web application to override the method specified in the request with the method given in the header field. This can be used when a user agent or firewall prevents PUT or DELETE methods from being sent directly.X-HTTP-Method-Override: DELETE
X-ATT-DeviceIdAllows easier parsing of the MakeModel/Firmware that is usually found in the User-Agent String of AT&T DevicesX-Att-Deviceid: GT-P7320/P7320XXLPG
X-Wap-ProfileLinks to an XML file on the Internet with a full description and details about the device currently connecting. In the example to the right is an XML file for an AT&T Samsung Galaxy S2.x-wap-profile: http://wap.samsungmobile.com/uaprof/SGH-I777.xml
Proxy-ConnectionImplemented as a misunderstanding of the HTTP specifications. Common because of mistakes in implementations of early HTTP versions. Has exactly the same functionality as standard Connection field.
Must not be used with HTTP/2.
Proxy-Connection: keep-alive
X-UIDHServer-side deep packet insertion of a unique ID identifying customers of Verizon Wireless; also known as "perma-cookie" or "supercookie"X-UIDH:...
X-Csrf-TokenUsed to prevent cross-site request forgery. Alternative header names are: X-CSRFToken and X-XSRF-TOKENX-Csrf-Token: i8XNjC4b8KVok4uw5RftR38Wgp2BFwql
X-Request-ID,
X-Correlation-ID
Correlates HTTP requests between a client and server.X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5
Save-DataThe Save-Data client hint request header available in Chrome, Opera, and Yandex browsers lets developers deliver lighter, faster applications to users who opt-in to data saving mode in their browser.Save-Data: on

Response fields

Standard response fields

Common non-standard response fields

Field nameDescriptionExample
Content-Security-Policy,
X-Content-Security-Policy,
X-WebKit-CSP
Content Security Policy definition.X-WebKit-CSP: default-src 'self'
RefreshUsed in redirection, or when a new resource has been created. This refresh redirects after 5 seconds. Header extension introduced by Netscape and supported by most web browsers.Refresh: 5; url=http://www.w3.org/pub/WWW/People.html
StatusCGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 7230.Status: 200 OK
Timing-Allow-OriginThe Timing-Allow-Origin response header specifies origins that are allowed to see values of attributes retrieved via features of the , which would otherwise be reported as zero due to cross-origin restrictions.Timing-Allow-Origin: *
Timing-Allow-Origin: *
X-Content-DurationProvide the duration of the audio or video in seconds; only supported by Gecko browsersX-Content-Duration: 42.666
X-Content-Type-OptionsThe 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.X-Content-Type-Options: nosniff
X-Powered-BySpecifies the technology supporting the web application X-Powered-By: PHP/5.4.0
X-Request-ID,
X-Correlation-ID
Correlates HTTP requests between a client and server.X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5
X-UA-CompatibleRecommends the preferred rendering engine to use to display the content. Also used to activate Chrome Frame in Internet Explorer.X-UA-Compatible: IE=EmulateIE7
X-UA-Compatible: IE=edge
X-UA-Compatible: Chrome=1
X-XSS-ProtectionCross-site scripting filterX-XSS-Protection: 1; mode=block

Effects of selected fields

Avoiding caching

If a web server responds with Cache-Control: no-cache then a web browser or other caching system must not use the response to satisfy subsequent requests without first checking with the originating server. 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. 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.
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. The behavior of Pragma: no-cache in a response is implementation specific. While some user agents do pay attention to this field in responses, the HTTP/1.1 RFC specifically warns against relying on this behavior.