List of HTTP header fields

{{Short description|None}}

{{Use mdy dates|date=June 2019}}

{{Use American English|date=June 2019}}

{{HTTP}}

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 or Global Privacy Control), the age (the time it has resided in a shared cache) of the document being downloaded, amongst others.

General format

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.{{Cite ietf |date=June 2014 |rfc=7230 |title=Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing |section=3.2.4 |sectionname=Field Parsing}}

HTTP/2{{cite ietf |rfc=9113 |title=HTTP/2 |date=June 2022}} and HTTP/3 instead use a binary protocol, where headers are encoded in a single HEADERS and zero or more CONTINUATION frames using HPACK{{cite journal|url=https://tools.ietf.org/html/rfc7541|title=HPACK: Header Compression for HTTP/2|publisher=IETF|date=May 2015|doi=10.17487/RFC7541 |access-date=2021-12-13|last1=Peon |first1=R. |last2=Ruellan |first2=H. }} (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 (:).

Field names

A core set of fields is standardized by the Internet Engineering Task Force (IETF) in {{IETF RFC|9110|9111|leadout=and}}. The [https://www.iana.org/assignments/http-fields/http-fields.xhtml#field-names Field Names], [https://www.iana.org/assignments/message-headers/message-headers.xml#perm-headers Header Fields] and [https://www.iana.org/assignments/message-headers/message-headers.xml#prov-headers 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.{{Cite ietf |date=June 2022 |rfc=9110 |title=HTTP Semantics |section=5.1 |sectionname=Field Names}} This is in contrast to HTTP method names (GET, POST, etc.), which are case-sensitive.{{Cite ietf |date=June 2022 |rfc=9110 |title=HTTP Semantics |section=9.1 |sectionname=Methods: Overview}}

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.{{cite journal|url=http://tools.ietf.org/html/rfc6648|title=RFC 6648|author=Internet Engineering Task Force|date=2012-06-01|doi=10.17487/RFC6648 |access-date=2012-11-12}} An earlier restriction on use of Downgraded- was lifted in March 2013.{{cite web|url=https://www.iana.org/assignments/message-headers/message-headers.xml |title=Message Headers |publisher=Iana.org |date=2014-06-11 |access-date=2014-06-12}}

Field values

A few fields can contain comments (i.e. in User-Agent, Server, Via fields), which can be ignored by software.{{cite ietf |date=June 2022 |rfc=9110 |title=HTTP Semantics |section=5.6.5 |sectionname=Comments}}

Many field values may contain a quality (q) key-value pair separated by equals sign, specifying a weight to use in content negotiation.{{cite ietf |date=June 2022 |rfc=9110 |title=HTTP Semantics |section=12.4.2 |sectionname=Quality Values}} 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.{{cite web|url=http://httpd.apache.org/docs/2.3/mod/core.html#limitrequestfieldsize|archive-url=https://web.archive.org/web/20120509104709/https://httpd.apache.org/docs/2.3/mod/core.html#limitrequestfieldsize|archive-date=2012-05-09 |title=core - Apache HTTP Server |publisher=Httpd.apache.org |access-date=2012-03-13}}

Request fields

=Standard request fields=

class="wikitable sortable"

|+

Name

! class="unsortable" | Description

! class="unsortable" | Example

! Status

!Standard

A-IMAcceptable instance-manipulations for the request.{{cite IETF|rfc=3229}}A-IM: feedPermanent

|{{IETF RFC|3229}}

id="accept-request-header"

| Accept

Media type(s) that is/are acceptable for the response. See Content negotiation.Accept: text/htmlPermanent

|{{IETF RFC|9110}}

Accept-CharsetCharacter sets that are acceptable.Accept-Charset: utf-8Permanent

|{{IETF RFC|9110}}

id="Accept-Datetime"

| Accept-Datetime

Acceptable version in time.Accept-Datetime: Thu, 31 May 2007 20:35:00 GMTProvisional

|{{IETF RFC|7089

}

|- id="Accept-Encoding"

| Accept-Encoding || List of acceptable encodings. See HTTP compression. ||Accept-Encoding: gzip, deflate|| Permanent

|{{IETF RFC|9110}}

|- id="Accept-Language"

| Accept-Language || List of acceptable human languages for response. See Content negotiation. ||Accept-Language: en-US|| Permanent

|{{IETF RFC|9110}}

|- id="access-control-request-header"

| {{nowrap|Access-Control-Request-Method,
Access-Control-Request-Headers}}{{cite web|url=https://www.w3.org/TR/cors/ |title=Cross-Origin Resource Sharing |access-date=2017-07-24}}|| Initiates a request for cross-origin resource sharing with Origin (below). || Access-Control-Request-Method: GET || {{nowrap|Permanent: standard}}

|

|-

| Authorization || Authentication credentials for HTTP authentication. || Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== || Permanent

|{{IETF RFC|9110}}

|-

| Cache-Control || Used to specify directives that must be obeyed by all caching mechanisms along the request-response chain. || Cache-Control: no-cache || Permanent

|{{IETF RFC|9111}}

|-

|- id="connection-request-header"

| Connection || Control options for the current connection and list of hop-by-hop request fields.{{cite ietf

|rfc=9110

|title=HTTP Semantics

|section=7.6.1

|sectionname=Connection header

|date=June 2022

}}

Must not be used with HTTP/2.{{cite ietf

|rfc=9113

|title=HTTP/2

|section=8.2.2

|sectionname=Connection-Specific Header Fields

|date=June 2022

}}

|| Connection: keep-alive

Connection: Upgrade

|| Permanent

|{{IETF RFC|9110}}

|-

|- id="content-encoding-request-header"

| Content-Encoding || The type of encoding used on the data. See HTTP compression. || Content-Encoding: gzip || Permanent

|{{IETF RFC|9110}}

|- id="content-length-request-header"

| Content-Length || The length of the request body in octets (8-bit bytes). || Content-Length: 348 || Permanent

|{{IETF RFC|9110}}

|-

| Content-MD5 || A Base64-encoded binary MD5 sum of the content of the request body. || Content-MD5: Q2hlY2sgSW50ZWdyaXR5IQ== || Obsolete{{cite ietf |rfc=7231 |title=Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content |appendix=B |sectionname=Changes from RFC 2616 |date=June 2014}}

|{{IETF RFC|1544|1864|4021}}

|- id="content-type-request-header"

| 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

|{{IETF RFC|9110}}

|-

| Cookie || An HTTP cookie previously sent by the server with Set-Cookie (below). || Cookie: $Version=1; Skin=new; || Permanent: standard

|{{IETF RFC|2965|6265}}

|- id="Content-Length"

|-

| 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

|{{IETF RFC|9110}}

|-

| Expect || Indicates that particular server behaviors are required by the client. || Expect: 100-continue || Permanent

|{{IETF RFC|9110}}

|-

| Forwarded || Disclose original information of a client connecting to a web server through an HTTP proxy.{{cite journal

|url=http://tools.ietf.org/html/rfc7239#section-1

|title=Forwarded HTTP Extension: Introduction

|publisher=IETF

|date=June 2014

|doi=10.17487/RFC7239

|access-date=2016-01-07

|last1=Petersson

|first1=A.

|last2=Nilsson

|first2=M.

}}

|| 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

|{{IETF RFC|7239|}}

|-

| From || The email address of the user making the request. || From: user@example.com || Permanent

|{{IETF RFC|9110}}

|-

|- id="host-request-header"

| 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.{{cite ietf

|rfc=9110

|title=HTTP Semantics

|section=7.2

|sectionname=Host and :authority

|date=June 2022

}}

If the request is generated directly in HTTP/2, it should not be used.{{cite ietf

|rfc=9113

|title=HTTP/2

|section=8.3.1

|sectionname=Request Pseudo-Header Fields

|date=June 2022

}}

| colspan="1"| Host: en.wikipedia.org:8080

Host: en.wikipedia.org

|Permanent

|{{IETF RFC|9110|9113}}

|-

|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.{{Cite web|url=https://www.iana.org/assignments/message-headers/message-headers.xml|title=Message Headers|website=www.iana.org|access-date=2018-11-26}}{{Cite ietf |rfc=7540 |title=Hypertext Transfer Protocol Version 2 (HTTP/2) |section=3.2.1 |sectionname=HTTP2-Settings Header Field}}

|HTTP2-Settings: token64

|Obsolete

|{{IETF RFC|7540|9113}}

|-

| 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

|{{IETF RFC|9110}}

|-

| 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

|{{IETF RFC|9110}}

|-

| If-None-Match || Allows a 304 Not Modified to be returned if content is unchanged, see HTTP ETag. || If-None-Match: "737060cd8c284d8af7ad3082f209582d" || Permanent

|{{IETF RFC|9110}}

|-

| 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

|{{IETF RFC|9110}}

|-

| 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

|{{IETF RFC|9110}}

|-

| Max-Forwards || Limit the number of times the message can be forwarded through proxies or gateways. || Max-Forwards: 10 || Permanent

|{{IETF RFC|9110}}

|- id="origin-request-header"

| Origin || Initiates a request for cross-origin resource sharing (asks server for Access-Control-* response fields). || Origin: http://www.example-social-network.com || Permanent: standard

|{{IETF RFC|6454}}

|-

| Pragma || Implementation-specific fields that may have various effects anywhere along the request-response chain. || Pragma: no-cache || Outdated

|{{IETF RFC|9111}}

|-

|Prefer

|Allows client to request that certain behaviors be employed by a server while processing a request.

|Prefer: return=representation

|Permanent

|{{IETF RFC| 7240}}

|-

| Proxy-Authorization || Authorization credentials for connecting to a proxy. || Proxy-Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== || Permanent

|{{IETF RFC|9110}}

|- id="range-request-header"

| {{anchor|Range}} Range || Request only part of an entity. Bytes are numbered from 0. See Byte serving. || Range: bytes=500-999 || Permanent

|{{IETF RFC|9110}}

|-

| Referer{{sic}} || 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.) || Referer: http://en.wikipedia.org/wiki/Main_Page || Permanent

|{{IETF RFC|9110}}

|- 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

|{{IETF RFC|9110}}

|-

|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

|{{IETF RFC|9110}}

|-

|Transfer-Encoding

|The form of encoding used to safely transfer the entity to the user. [https://www.iana.org/assignments/http-parameters Currently defined methods] are: chunked, compress, deflate, gzip, identity.

Must not be used with HTTP/2.

|Transfer-Encoding: chunked

|Permanent

|{{IETF RFC|9110}}

|-

|- 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

|{{IETF RFC|9110}}

|-

| 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

|{{IETF RFC|9110}}

|-

| Via || Informs the server of proxies through which the request was sent. || Via: 1.0 fred, 1.1 example.com (Apache/1.1) || Permanent

|{{IETF RFC|9110}}

|-

| Warning || A general warning about possible problems with the entity body. || Warning: 199 Miscellaneous warning || Obsolete{{cite ietf |rfc=9111 |title=HTTP Caching |section=5.5 |sectionname=Warning header |date=June 2022}}

|{{IETF RFC|7234|9111}}

|}

{{anchor|Common non-standard request headers}}

=Common non-standard request fields=

class="wikitable sortable" style="width: 100%; clear:right;"
Field name

! class="unsortable" | Description

! class="unsortable" | Example

{{nowrap|Upgrade-Insecure-Requests}}{{cite web|title=Upgrade Insecure Requests - W3C Candidate Recommendation|url=https://www.w3.org/TR/upgrade-insecure-requests/#preference|website=W3C|access-date=14 January 2016|date=8 October 2015}}Tells a server which (presumably in the middle of a HTTP -> HTTPS migration) hosts mixed content that the client would prefer redirection to HTTPS and can handle Content-Security-Policy: upgrade-insecure-requestsUpgrade-Insecure-Requests: 1
id="Requested-With"

| style=white-space:nowrap | X-Requested-With

Mainly used to identify Ajax requests (most JavaScript frameworks send this field with value of XMLHttpRequest); also identifies Android apps using WebView{{cite web | url=https://www.stoutner.com/the-x-requested-with-header/ | title=The "X-Requested-With" Header – Stoutner | date=October 31, 2022 }} X-Requested-With: XMLHttpRequest
DNT{{cite web|url=http://blog.sidstamm.com/2011/01/try-out-do-not-track-http-header.html |title=Try out the "Do Not Track" HTTP header |access-date=2011-01-31}}Requests a web application to disable their tracking of a user. This is Mozilla's version of the X-Do-Not-Track header field (since Firefox 4.0 Beta 11). Safari and IE9 also have support for this field.{{cite web|url=http://blogs.msdn.com/b/ie/archive/2011/03/14/web-tracking-protection-minimum-standards-and-opportunities-to-innovate.aspx |title=Web Tracking Protection: Minimum Standards and Opportunities to Innovate |access-date=2011-03-24}} On March 7, 2011, a draft proposal was submitted to IETF.IETF [http://tools.ietf.org/html/draft-mayer-do-not-track-00 Do Not Track: A Universal Third-Party Web Tracking Opt Out] March 7, 2011 The W3C Tracking Protection Working Group is producing a specification.W3C [http://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html Tracking Preference Expression (DNT)], January 26, 2012DNT: 1 (Do Not Track Enabled)

DNT: 0 (Do Not Track Disabled)

style=white-space:nowrap | X-Forwarded-For{{cite web|url=http://wiki.squid-cache.org/SquidFaq/ConfiguringSquid#head-3518b69c63e221cc3cd7885415e365ffaf3dd27f |title=SquidFaq/ConfiguringSquid - Squid Web Proxy Wiki |author=Amos Jeffries |date=2010-07-02 |access-date=2009-09-10}}A 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-Host{{cite web|url=http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#x-headers |title=mod_proxy - Apache HTTP Server Version 2.2|author=The Apache Software Foundation|access-date=2014-11-12}}A 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 (load balancer) 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-Proto{{cite web|url=http://www.geekisp.com/faq/6_65_en.html |title=How do I adjust my SSL site to work with GeekISP's loadbalancer? |author=Dave Steinberg |date=2007-04-10 |access-date=2010-09-30}}A de facto standard for identifying the originating protocol of an HTTP request, since a reverse proxy (or a load balancer) may communicate with a web server using HTTP even if the request to the reverse proxy is HTTPS. An alternative form of the header (X-ProxyUser-Ip) is used by Google clients talking to Google servers. Superseded by Forwarded header.X-Forwarded-Proto: https
Front-End-Https{{cite web|url=https://technet.microsoft.com/en-us/library/aa997519(v=exchg.65).aspx |title=Helping to Secure Communication: Client to Front-End Server |date=2006-07-27 |access-date=2012-04-23}}Non-standard header field used by Microsoft applications and load-balancersFront-End-Https: on
X-Http-Method-Override{{cite web|url=https://opensocial.github.io/spec/2.5.1/Core-API-Server.xml#rfc.section.2.1.1.1 |title=OpenSocial Core API Server Specification 2.5.1 |access-date=2014-10-08}}Requests a web application to override the method specified in the request (typically POST) with the method given in the header field (typically PUT or DELETE). This can be used when a user agent or firewall prevents PUT or DELETE methods from being sent directly (this is either a bug in the software component, which ought to be fixed, or an intentional configuration, in which case bypassing it may be the wrong thing to do).X-HTTP-Method-Override: DELETE
X-ATT-DeviceId{{cite web|url=http://developer.att.com/developer/forward.jsp?passedItemId=5300270 |title=ATT Device ID |access-date=2012-01-14 |archive-url=https://web.archive.org/web/20120216021736/http://developer.att.com/developer/forward.jsp?passedItemId=5300270 |archive-date=2012-02-16}}Allows 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-Profile{{cite web|url=http://www.developershome.com/wap/detection/detection.asp?page=profileHeader |title=WAP Profile |access-date=2012-01-14}}Links 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-Connection{{cite web |url=https://jdebp.eu/FGA/web-proxy-connection-header.html |title=The Proxy-Connection: header is a mistake in how some web browsers use HTTP. |access-date=2018-01-16| last=de Boyne Pollard| first=Jonathan|year=2007 | archive-url=https://web.archive.org/web/20161023162007/https://jdebp.eu/FGA/web-proxy-connection-header.html | archive-date=2016-10-23 | url-status=dead}}Implemented 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-UIDH{{cite web|url=https://www.eff.org/deeplinks/2014/11/verizon-x-uidh|title=Verizon Injecting Perma-Cookies to Track Mobile Customers, Bypassing Privacy Controls|publisher=Electronic Frontier Foundation|access-date=2014-01-19}}{{cite web|url=http://lessonslearned.org/sniff|title=Checking known AT&T, Verizon, Sprint, Bell Canada & Vodacom Unique Identifier beacons|access-date=2014-01-19}}{{cite news|url=https://www.washingtonpost.com/business/technology/verizon-atandt-tracking-their-users-with-super-cookies/2014/11/03/7bbbf382-6395-11e4-bb14-4cfea1e742d5_story.html|title=Verizon, AT&T tracking their users with 'supercookies'|author=Craig Timberg|newspaper=The Washington Post|access-date=2014-01-19}}Server-side deep packet inspection of a unique ID identifying customers of Verizon Wireless; also known as "perma-cookie" or "supercookie"X-UIDH: ...
X-Csrf-Token{{cite web|url=https://help.sap.com/saphelp_nw74/helpdata/en/b3/5c22518bc72214e10000000a44176d/content.htm|title=SAP Cross-Site Request Forgery Protection|publisher=SAP SE|access-date=2015-01-20}}Used to prevent cross-site request forgery. Alternative header names are: X-CSRFToken{{cite web|url=https://docs.djangoproject.com/en/1.7/ref/contrib/csrf/|title=Django Cross Site Request Forgery protection|publisher=Django (web framework)|access-date=2015-01-20|archive-url=https://web.archive.org/web/20150120134602/https://docs.djangoproject.com/en/1.7/ref/contrib/csrf/|archive-date=January 20, 2015|url-status=dead}} and X-XSRF-TOKEN{{cite web|url=https://docs.angularjs.org/api/ng/service/$http#cross-site-request-forgery-xsrf-protection|title=Angular Cross Site Request Forgery (XSRF) Protection|publisher=AngularJS|access-date=2015-01-20}}X-Csrf-Token: i8XNjC4b8KVok4uw5RftR38Wgp2BFwql
X-Request-ID,{{cite web|url=https://devcenter.heroku.com/articles/http-request-id|title=HTTP Request IDs|website=devcenter.heroku.com|access-date=2022-03-22}}

X-Correlation-ID,{{Cite news|url=https://blog.rapid7.com/2016/12/23/the-value-of-correlation-ids/|title=The Value of Correlation IDs|date=2016-12-23|work=Rapid7 Blog|access-date=2018-04-13|language=en}}

Correlation-ID{{Cite web|url=http://hilton.org.uk/blog/microservices-correlation-id|title=Correlation IDs for microservices architectures - Peter Hilton|last=Hilton|first=Peter|website=hilton.org.uk|date=July 12, 2017 |language=en|access-date=2018-04-13}}

|Correlates HTTP requests between a client and server. Superseded by the traceparent header

{{cite web|url=https://www.w3.org/TR/trace-context/|title=W3C Trace Context|website=w3c.org|access-date=2024-06-19}}

|X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5

Save-Data{{cite web |url=https://wicg.github.io/savedata/#save-data-request-header-field |title=Save Data API Living Document Draft Community Group Report 2.1.1. Save-Data Request Header Field |author= |date=30 June 2020 |website=Web Platform Incubator Community Group |access-date=2021-03-05}}

|The 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

Sec-GPC{{cite web |url=https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-GPC |title=Sec-GPC |author=((MDN contributors)) |date=3 Mar 2023 |website=MDN Web Docs |access-date=2023-03-12}}

|The Sec-GPC (Global Privacy Control) request header indicates whether the user consents to a website or service selling or sharing their personal information with third parties.

|Sec-GPC: 1

Response fields

=Standard response fields=

class="wikitable sortable" style="width: 100%"
Field name

! class="unsortable" | Description

! class="unsortable" | Example

! Status

!Standard

Accept-CHRequests HTTP Client HintsAccept-CH: UA, PlatformExperimental

|{{IETF RFC|8942}}

id="access-Control-response-headers"

| {{nowrap|Access-Control-Allow-Origin,
Access-Control-Allow-Credentials,
Access-Control-Expose-Headers,
Access-Control-Max-Age,
Access-Control-Allow-Methods,
Access-Control-Allow-Headers}}

Specifying which web sites can participate in cross-origin resource sharingAccess-Control-Allow-Origin: *{{nowrap|Permanent: standard}}

|{{IETF RFC|7480}}

id="accept-patch-response-header"

| Accept-Patch{{cite journal|url=http://tools.ietf.org/html/rfc5789#section-3.1 |title=RFC 5789 |year=2010 |doi=10.17487/RFC5789 |access-date=2014-12-24|last1=Dusseault |first1=L. |last2=Snell |first2=J. |s2cid=42062521 }}

Specifies which patch document formats this server supportsAccept-Patch: text/example;charset=utf-8Permanent

|{{IETF RFC|5789}}

id="accept-ranges-response-header"

| Accept-Ranges

What partial content range types this server supports via byte servingAccept-Ranges: bytesPermanent

|{{IETF RFC|9110}}

AgeThe age the object has been in a proxy cache in secondsAge: 12Permanent

|{{IETF RFC|9111}}

AllowValid methods for a specified resource. To be used for a 405 Method not allowedAllow: GET, HEADPermanent

|{{IETF RFC|9110}}

Alt-Svc{{cite journal|url=https://tools.ietf.org/html/rfc7838|title=HTTP Alternative Services

|publisher=IETF|date=April 2016|doi=10.17487/RFC7838

|access-date=2016-04-19|last1=Nottingham

|first1=M.

|last2=McManus

|first2=P.

|last3=Reschke

|first3=J.

|doi-access=free

}}

A server uses "Alt-Svc" header (meaning Alternative Services) to indicate that its resources can also be accessed at a different network location (host or port) or using a different protocol

When using HTTP/2, servers should instead send an ALTSVC frame.{{cite journal|url=https://tools.ietf.org/html/rfc7838#section-3|title=HTTP Alternative Services, section 3

|publisher=IETF|date=April 2016|doi=10.17487/RFC7838

|access-date=2017-06-08|last1=Nottingham

|first1=M.

|last2=McManus

|first2=P.

|last3=Reschke

|first3=J.

|doi-access=free

}}

Alt-Svc: http/1.1="http2.example.com:8001"; ma=7200Permanent

|

Cache-ControlTells all caching mechanisms from server to client whether they may cache this object. It is measured in secondsCache-Control: max-age=3600Permanent

|{{IETF RFC|9111}}

ConnectionControl options for the current connection and list of hop-by-hop response fields.

Must not be used with HTTP/2.

Connection: closePermanent

|{{IETF RFC|9110}}

Content-Disposition{{cite journal|url=http://tools.ietf.org/html/rfc6266 |title=RFC 6266 |year=2011 |doi=10.17487/RFC6266 |access-date=2015-03-13|last1=Reschke |first1=J. |doi-access=free }}An opportunity to raise a "File Download" dialogue box for a known MIME type with binary format or suggest a filename for dynamic content. Quotes are necessary with special characters.Content-Disposition: attachment; filename="fname.ext"Permanent

|{{IETF RFC|2616|4021|6266}}

id="content-encoding-response-header"

| Content-Encoding

The type of encoding used on the data. See HTTP compression.Content-Encoding: gzipPermanent

|{{IETF RFC|9110}}

Content-LanguageThe natural language or languages of the intended audience for the enclosed content{{cite ietf |date=June 2022 |rfc=9110 |title=HTTP Semantics |section=8.5 |sectionname=Content-Language}}Content-Language: daPermanent

|{{IETF RFC|9110}}

id="content-length-response-header"

| Content-Length

The length of the response body in octets (8-bit bytes)Content-Length: 348Permanent

|{{IETF RFC|9110}}

Content-LocationAn alternate location for the returned dataContent-Location: /index.htmPermanent

|{{IETF RFC|9110}}

Content-MD5A Base64-encoded binary MD5 sum of the content of the responseContent-MD5: Q2hlY2sgSW50ZWdyaXR5IQ==Obsolete

|{{IETF RFC|1544|1864|4021}}

id="content-range-response-header"

| Content-Range

Where in a full body message this partial message belongsContent-Range: bytes 21010-47021/47022Permanent

|{{IETF RFC|9110}}

id="content-type-response-header"

| Content-Type

The MIME type of this contentContent-Type: text/html; charset=utf-8Permanent

|{{IETF RFC|9110}}

DateThe date and time that the message was sent (in "HTTP-date" format as defined by RFC 9110)Date: Tue, 15 Nov 1994 08:12:31 GMTPermanent

|{{IETF RFC|9110}}

Delta-BaseSpecifies the delta-encoding entity tag of the response.Delta-Base: "abc"Permanent

|{{IETF RFC|3229}}

ETagAn identifier for a specific version of a resource, often a message digestETag: "737060cd8c284d8af7ad3082f209582d"Permanent

|{{IETF RFC|9110}}

id="Expires"

| Expires

Gives the date/time after which the response is considered stale (in "HTTP-date" format as defined by RFC 9110)Expires: Thu, 01 Dec 1994 16:00:00 GMTPermanent: standard

|{{IETF RFC|9111}}

IMInstance-manipulations applied to the response.IM: feedPermanent

|{{IETF RFC|3229}}

Last-ModifiedThe last modified date for the requested object (in "HTTP-date" format as defined by RFC 9110)Last-Modified: Tue, 15 Nov 1994 12:45:26 GMTPermanent

|{{IETF RFC|9110}}

LinkUsed to express a typed relationship with another resource, where the relation type is defined by RFC 8288Link: </feed>; rel="alternate"[https://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394 Indicate the canonical version of a URL by responding with the Link rel="canonical" HTTP header] Retrieved: 2012-02-09Permanent

|{{IETF RFC|8288}}

LocationUsed in redirection, or when a new resource has been created.

|

  • Example 1: Location: http://www.w3.org/pub/WWW/People.html
  • Example 2: Location: /pub/WWW/People.html
Permanent

|{{IETF RFC|9110}}

P3PThis field is supposed to set P3P policy, in the form of P3P:CP="your_compact_policy". However, P3P did not take off,W3C [http://www.w3.org/P3P P3P Work Suspended] 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 https://en.wikipedia.org/wiki/Special:CentralAutoLogin/P3P for more info."Permanent

|

PragmaImplementation-specific fields that may have various effects anywhere along the request-response chain.Pragma: no-cachePermanent

|{{IETF RFC|9111}}

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-AuthenticateRequest authentication to access the proxy.Proxy-Authenticate: BasicPermanent

|{{IETF RFC|9110}}

id="PKP"

| Public-Key-Pins{{cite web | url=http://www.rfc-editor.org/rfc/rfc7469.txt | title=Public Key Pinning Extension for HTTP | publisher=IETF | access-date=17 April 2015}}

HTTP Public Key Pinning, announces hash of website's authentic TLS certificatePublic-Key-Pins: max-age=2592000; pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=";Permanent

|{{IETF RFC|7469}}

Retry-AfterIf 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.{{cite ietf |date=June 2022 |rfc=9110 |title=HTTP Semantics |section=10.2.3 |sectionname=Retry-After}}

|

  • Example 1: Retry-After: 120
  • Example 2: Retry-After: Fri, 07 Nov 2014 23:59:59 GMT

|

Permanent

|{{IETF RFC|9110}}

ServerA name for the serverServer: Apache/2.4.1 (Unix)Permanent

|{{IETF RFC|9110}}

id="innerlink_set-cookie" | Set-CookieAn HTTP cookieSet-Cookie: CookieName=CookieValue; Max-Age=3600; Version=1Permanent: standard

|{{IETF RFC|6265}}

Strict-Transport-SecurityA 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; includeSubDomainsPermanent: standard

|

id="trailer-response-header"

| 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-ForwardsPermanent

|{{IETF RFC|9110}}

id="transfer-encoding-response-header"

| Transfer-Encoding

The form of encoding used to safely transfer the entity to the user. [https://www.iana.org/assignments/http-parameters Currently defined methods] are: chunked, compress, deflate, gzip, identity.

Must not be used with HTTP/2.

Transfer-Encoding: chunkedPermanent

|{{IETF RFC|9110}}

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

|

UpgradeAsk the client to upgrade to another protocol.

Must not be used in HTTP/2

Upgrade: h2c, HTTPS/1.3, IRC/6.9, RTA/x11, websocketPermanent

|{{IETF RFC|9110}}

VaryTells 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.* Example 1: Vary: *

  • Example 2: Vary: Accept-Language
Permanent

|{{IETF RFC|9110}}

ViaInforms the client of proxies through which the response was sent.Via: 1.0 fred, 1.1 example.com (Apache/1.1)Permanent

|{{IETF RFC|9110}}

WarningA general warning about possible problems with the entity body.Warning: 199 Miscellaneous warningObsolete

|{{IETF RFC|7234|9111}}

id="www-authenticate-response-header"

| WWW-Authenticate

Indicates the authentication scheme that should be used to access the requested entity.WWW-Authenticate: BasicPermanent

|{{IETF RFC|9110}}

id="Frame-Options"

| X-Frame-Options{{cite journal|url=https://tools.ietf.org/html/rfc7034|title=HTTP Header Field X-Frame-Options |year=2013 |publisher=IETF |doi=10.17487/RFC7034 |access-date=2014-06-12|last1=Ross |first1=D. |last2=Gondrom |first2=T. |doi-access=free }}

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: denyObsolete{{cite web|url=http://www.w3.org/TR/CSP11/#frame-ancestors-and-frame-options |title=Content Security Policy Level 2 |access-date=2014-08-02}}

|

=Common non-standard response fields=

class="wikitable sortable" style="width: 100%; clear:right;"
Field name

! class="unsortable" | Description

! class="unsortable" | Example

Content-Security-Policy,
X-Content-Security-Policy,
X-WebKit-CSP{{cite web|url=http://www.w3.org/TR/CSP/|title=Content Security Policy |publisher=W3C |year=2012|access-date=28 April 2017}}

|Content Security Policy definition.

|X-WebKit-CSP: default-src 'self'

Expect-CT{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expect-CT|title=Expect-CT|website=Mozilla Developer Network|language=en-US|access-date=2021-07-23}}

| Notify to prefer to enforce Certificate Transparency.

|Expect-CT: max-age=604800, enforce, report-uri="https://example.example/report"

NEL{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/NEL/|title=NEL|website=Mozilla Developer Network|language=en-US|year=2021|access-date=2021-05-18}}Used to configure network request logging.{{code|2=yaml|1=NEL: { "report_to": "name_of_reporting_group", "max_age": 12345, "include_subdomains": false, "success_fraction": 0.0, "failure_fraction": 1.0 } }}
Permissions-Policy{{cite web|url=https://www.w3.org/TR/permissions-policy/|title=Permissions Policy | publisher=W3C|year=2020|access-date=2021-05-01}}To allow or disable different features or APIs of the browser.Permissions-Policy: fullscreen=(), camera=(), microphone=(), geolocation=(), interest-cohort=(){{cite web|url=https://amifloced.org/|title=Am I FLoCed?|publisher=EFF|year=2021|access-date=2021-05-01}}
id="Refresh"

| Refresh

Tells the browser to refresh the page or redirect to a different URL, after a given number of seconds (0 meaning immediately); {{clarify |text=or when a new resource has been created|date=August 2024}}. 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.{{cite web |url=https://github.com/whatwg/html/pull/2892 |title=Define the HTTP Refresh header by annevk · Pull Request #2892 · whatwg/html |date=2017-08-09 |website=GitHub |access-date=2021-04-17 |quote=}}Refresh: 5; url=http://www.w3.org/pub/WWW/People.html
Report-To{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-to|title=CSP: report-to |website=Mozilla Developer Network|language=en-US|year=2021|access-date=2021-05-18}}Instructs the user agent to store reporting endpoints for an origin.{{code|2=yaml|1=Report-To: { "group": "csp-endpoint", "max_age": 10886400, "endpoints": [ { "url": "https-url-of-site-which-collects-reports" } ] } }}
StatusCGI header field specifying the status of the HTTP response. Normal HTTP responses use a separate "Status-Line" instead, defined by RFC 9110.

{{IETF RFC|9110|link=no}}: HTTP Semantics

| 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 [https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API Resource Timing API], which would otherwise be reported as zero due to cross-origin restrictions.{{Cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Timing-Allow-Origin|title=Timing-Allow-Origin|website=Mozilla Developer Network|language=en-US|access-date=2018-01-25}}

|Timing-Allow-Origin: *

Timing-Allow-Origin: [, ]*

X-Content-Duration{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/HTTP/Configuring_servers_for_Ogg_media#Serve_X-Content-Duration_headers |title=Configuring servers for Ogg media |date=2014-05-26 |access-date=2015-01-03}}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.{{cite web|url=https://bugzilla.mozilla.org/show_bug.cgi?id=1160695|title=Clean up duration tracking and use mirroring for cross-thread access|website=Bugzilla@Mozilla|access-date=2024-02-09}}X-Content-Duration: 42.666
X-Content-Type-Options{{cite web|url=http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx |title=IE8 Security Part VI: Beta 2 Update |author=Eric Lawrence |date=2008-09-03 |access-date=2010-09-28}}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.{{cite web|url=https://code.google.com/chrome/extensions/hosting.html |title=Hosting - Google Chrome Extensions - Google Code |access-date=2012-06-14}}X-Content-Type-Options: nosniff{{cite web |url=https://fetch.spec.whatwg.org/#x-content-type-options-header |title=Fetch standard |last1=van Kesteren |first1=Anne |date=2016-08-26 |website=WHATWG |access-date=2016-08-26 |url-status=live |archive-url=https://web.archive.org/web/20160826132911/https://fetch.spec.whatwg.org/#x-content-type-options-header |archive-date=2016-08-26}}
id="Powered-By"

| X-Powered-By{{cite web|url=https://stackoverflow.com/questions/1288338/why-does-asp-net-framework-add-the-x-powered-byasp-net-http-header-in-response |title=Why does ASP.NET framework add the 'X-Powered-By:ASP.NET' HTTP Header in responses? - Stack Overflow |access-date=2022-03-20 |ref=stackoverflow1}}

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{{cite web|url=https://webtechsurvey.com/response-header/x-redirect-by |title=X-Redirect-By HTTP response header |access-date=2021-05-29}}

|Specifies the component that is responsible for a particular redirect.

|X-Redirect-By: WordPress
X-Redirect-By: Polylang

X-Request-ID, X-Correlation-ID{{Cite web |date= |title=What is the X-REQUEST-ID http header? |url=https://stackoverflow.com/questions/25433258/what-is-the-x-request-id-http-header |access-date=2022-03-20 |ref=stackoverflow2}}

|Correlates HTTP requests between a client and server.

|X-Request-ID: f058ebd6-02f7-4d3f-942e-904344e8cde5

X-UA-Compatible{{cite web|url=http://msdn.microsoft.com/en-us/library/ie/cc288325%28v=vs.85%29.aspx#SetMode |title=Defining Document Compatibility: Specifying Document Compatibility Modes |date=2011-04-01 |access-date=2012-01-24 }}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.{{cite web |url=https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-x-ua-compatible |title=HTML Living Standard 4.2.5.3 Pragma directives, X-UA-Compatible state |date=2021-03-12 |website=WHATWG |access-date=2021-03-14 |quote=For meta elements with an http-equiv attribute in the X-UA-Compatible state, the content attribute must have a value that is an ASCII case-insensitive match for the string"IE=edge".}}X-UA-Compatible: IE=edge
X-UA-Compatible: IE=EmulateIE7
X-UA-Compatible: Chrome=1
X-XSS-Protection{{cite web|url=http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-iv-the-xss-filter.aspx |title=IE8 Security Part IV: The XSS Filter |author=Eric Lawrence |date=2008-07-02 |access-date=2010-09-30}}Cross-site scripting (XSS) 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 (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.{{cite ietf |date=June 2022 |rfc=9111 |title=HTTP Caching |section=5.4 |sectionname=Pragme}} The behavior of Pragma: no-cache in a response is implementation specific. While some user agents do pay attention to this field in responses,{{cite web|url= https://support.microsoft.com/en-us/kb/234067/ |title=How to prevent caching in Internet Explorer |publisher=Microsoft |date=2011-09-22 |access-date=2015-04-15}} the HTTP/1.1 RFC specifically warns against relying on this behavior.

See also

References

{{reflist}}

{{CCBYSASource

|sourcepath = https://stackoverflow.com/q/25433258

|sourcearticle = What is the X-REQUEST-ID http header?

|revision = 27174552

|author(s) = [https://stackoverflow.com/users/693140/stefan-k%c3%b6gl Stefan Kögl] at Stack Exchange }}

{{reflist|group=stackoverflow2}}

{{CCBYSASource

|sourcepath = https://stackoverflow.com/q/1288338

|sourcearticle = Why does ASP.NET framework add the 'X-Powered-By:ASP.NET' HTTP Header in responses?

|revision = 1288385

|author(s) = [https://stackoverflow.com/users/59301/adrian-grigore Adrian Grigore] at Stack Exchange }}

{{reflist|group=stackoverflow1}}