Last Updated: 9/19/2022 Created: 5/1/2022

HTTP Headers

  • End-to-end headers: headers must be transmitted to the final recipient (proxies must retransmit, caches must store)
  • Hop-by-hop headers: Meaningful only for a single transport-level connection. (must not be retransmitted or cached)
categoryheaderdescription
Auth.Authorizationauth-scheme csv-authorization-parameters
CacheAgevalue-in-seconds
CacheCache-ControlExample directives: max-age, no-cache, no-store, stale-if-error
CacheClear-Site-DataClears cookies, storage, cache associated with the server
CacheExpiresAn HTTP Date/time after which response will be stale. Ignored if Cache-Control with max-age is present
CachePragmaUsed for HTTP/1.0 caches where Cache-Control is absent.
Cond.Last-Modified
Cond.ETagA unique string identifying the version of the resource. Used by conditional headers.
Cond.If-Match
Cond.If-None-Match
Cond.If-Modified-Since
Cond.Vary
Conn.ConnectionControls whether the network connection stays open
Conn.Keep-AliveControls how long persistent connection stays open
ContentAcceptAccepted types of data
ContentAccept-EncodingAccepted compression algorithms
ContentAccept-LanguageHint expected human language for server responses
ContentContent-LengthSize of resources in decimal number of bytes
ContentContent-TypeIndicates the type of the sources
ContentContent-EncodingSpecified the compression algorithm
ContentContent-LanguageThe human language intended for the audience
ContentContent-LocationIndicates alternate location for the returned data
ControlExpectExpectations of the server
CookiesCookieStored HTTP cookies
CookiesSet-CookieSend cookies from the server to the user-agent
CORSAccess-Control-Allow-OriginIndicates whether the response can be shared.
CORSAccess-Control-Allow-CredentialsIndicates whether the response can be exposed when the credentials flag is true.
CORSAccess-Control-Allow-HeadersIn response to a preflight request, lists allowed HTTP headers
CORSAccess-Control-Allow-MethodsIn response to a preflight request, lists allowed HTTP methods
CORSAccess-Control-Expose-HeadersList of headers that can be exposed
CORSAccess-Control-Max-AgePreflight request cache time
CORSAccess-Control-Request-HeadersDuring preflight, specify HTTP headers that will be used in the actual request
CORSAccess-Control-Request-MethodDuring preflight, specify which HTTP method will be used
CORSOriginWhere a fetch originates from
CORSTiming-Allow-OriginOrigins that are allowed to see values from Resource Timing API
DownloadContent-DispositionWhether to display a downloaded file inline or pop up a "Save As" dialog
ProxyForwardedOptionally added by reverse proxy servers that would otherwise be altered or lost due to proxying
ProxyVia
RedirectLocationThe URL to redirect a page to.
RequestFrom
RequestHostDomain name of the server (for virtual hosting), and (optionally) the TCP port number
RequestRefererThe address of the previous web page from which a link to the currently requested page was followed.
RequestReferrer-PolicyWhich referrer information sent in the Referer header should be included with requests made
RequestUser-AgentIdentifies application type, operating system, software vendor or software version of the client
ResponseAllowHTTP request methods supported by a resource.
ResponseServerInformation about the software used by the origin server to handle the request
Range...
SecurityCross-Origin-Embedder-PolicyPrevents loading any cross-origin resources that don't explicitly grant the document permission
SecurityCross-Origin-Opener-PolicyAllows to block a top-level document from sharing a browsing context group with cross-origin docs
SecurityCross-Origin-Resource-PolicyBrowser should block no-cors cross-origin/cross-site requests to the given resource
SecurityCross-Security-PolicyControls resources the user agent is allowed to load for a given page.
SecurityCross-Security-Policy-Report-OnlyAllows experimentation without enforcing. JSON Reports are sent via POST to the specified URI

Also check out Web Security for more details.

Example Values

headerExamples
AuthorizationBasic credentials
Age60
Cache-Controlmax-age=604800
ExpiresWed, 21 Oct 2015 07:28:00 GMT
Connectionclose (default), keep-alive
Keep-Alivetimeout=5, max=1000
Acceptapplication/json, text/json, application/xml, text/plain, text/markdown, text/*
Content-Typemultipart/form-data; boundary=something
Content-Languageen-US, en-CA, de-DE
Cookiename=value; name2=value2; ...
Set-Cookiename=value; booleanProperty; property=value; ...
Access-Control-Allow-Origin*, origin
Access-Control-Allow-Credentialstrue (note: false is not valid, just omit the header)
Access-Control-Request-MethodOPTIONS, GET, POST, DELETE, ...
Referrer-Policyno-referrer, strict-origin-when-cross-origin (default), ...
Cross-Origin-Embedder-Policyunsafe-none (default) | require-corp
Cross-Origin-Opener-Policyunsafe-none (default) | same-origin-allow-popups | same-origin
Cross-Origin-Resource-Policysame-origin | same-site | cross-origin (default)

More on Mozilla