HTTP Headers Reference
Complete reference for HTTP headers with descriptions, examples, and documentation links. Search and filter by type and category.
AuthorizationRequestAuthenticationContains credentials for authenticating the client with a server
Authorization: Bearer eyJhbGc...WWW-AuthenticateResponseAuthenticationDefines the authentication method that should be used to access a resource
WWW-Authenticate: Basic realm="Access"Proxy-AuthorizationRequestAuthenticationContains credentials for authenticating with a proxy server
Proxy-Authorization: Basic dXNlcjpwYXNzProxy-AuthenticateResponseAuthenticationDefines the authentication method for a proxy server
Proxy-Authenticate: BasicCache-ControlBothCachingDirectives for caching mechanisms in requests and responses
Cache-Control: max-age=3600, publicExpiresResponseCachingDate/time after which the response is considered stale
Expires: Wed, 21 Oct 2025 07:28:00 GMTETagResponseCachingIdentifier for a specific version of a resource
ETag: "33a64df551425fcc55e4d42a148795d9"If-None-MatchRequestCachingMakes request conditional; returns 304 if ETag matches
If-None-Match: "33a64df551425fcc55e4d42a148795d9"If-Modified-SinceRequestCachingMakes request conditional based on modification date
If-Modified-Since: Wed, 21 Oct 2024 07:28:00 GMTLast-ModifiedResponseCachingDate and time at which the resource was last modified
Last-Modified: Tue, 15 Nov 2024 12:45:26 GMTAgeResponseCachingTime in seconds the object was in a proxy cache
Age: 24VaryResponseCachingDetermines how to match request headers for cache
Vary: Accept-Encoding, User-AgentAcceptRequestContent NegotiationMedia types acceptable for the response
Accept: application/json, text/htmlAccept-CharsetRequestContent NegotiationCharacter encodings acceptable for the response
Accept-Charset: utf-8, iso-8859-1Accept-EncodingRequestContent NegotiationAcceptable content encodings (compression)
Accept-Encoding: gzip, deflate, brAccept-LanguageRequestContent NegotiationPreferred natural languages for the response
Accept-Language: en-US, en;q=0.9, fr;q=0.8Content-TypeBothContentMedia type of the resource/data
Content-Type: application/json; charset=utf-8Content-LengthBothContentSize of the resource in bytes
Content-Length: 348Content-EncodingResponseContentCompression algorithm used on the resource
Content-Encoding: gzipContent-LanguageResponseContentNatural language(s) of the resource
Content-Language: en-USContent-LocationResponseContentAlternate location for the returned data
Content-Location: /documents/foo.jsonContent-DispositionResponseContentHow content should be displayed (inline/attachment)
Content-Disposition: attachment; filename="file.pdf"Content-RangeResponseContentWhere a partial message belongs in a full body
Content-Range: bytes 200-1000/67589Access-Control-Allow-OriginResponseCORSSpecifies origins allowed to access the resource
Access-Control-Allow-Origin: https://example.comAccess-Control-Allow-MethodsResponseCORSMethods allowed when accessing the resource
Access-Control-Allow-Methods: GET, POST, PUT, DELETEAccess-Control-Allow-HeadersResponseCORSHeaders allowed in the actual request
Access-Control-Allow-Headers: Content-Type, AuthorizationAccess-Control-Allow-CredentialsResponseCORSWhether credentials can be exposed to the page
Access-Control-Allow-Credentials: trueAccess-Control-Expose-HeadersResponseCORSHeaders that can be exposed to the browser
Access-Control-Expose-Headers: X-Custom-HeaderAccess-Control-Max-AgeResponseCORSHow long preflight results can be cached
Access-Control-Max-Age: 86400Access-Control-Request-MethodRequestCORSMethod that will be used in the actual request (preflight)
Access-Control-Request-Method: POSTAccess-Control-Request-HeadersRequestCORSHeaders that will be used in the actual request (preflight)
Access-Control-Request-Headers: Content-TypeOriginRequestCORSOrigin of the request (scheme, host, port)
Origin: https://example.comContent-Security-PolicyResponseSecurityControls resources the browser is allowed to load
Content-Security-Policy: default-src 'self'; script-src 'self'Strict-Transport-SecurityResponseSecurityForces HTTPS connections (HSTS)
Strict-Transport-Security: max-age=31536000; includeSubDomainsX-Content-Type-OptionsResponseSecurityPrevents MIME type sniffing
X-Content-Type-Options: nosniffX-Frame-OptionsResponseSecurityControls whether page can be displayed in iframe
X-Frame-Options: DENYX-XSS-ProtectionResponseSecurityEnables browser XSS filtering (legacy)
X-XSS-Protection: 1; mode=blockReferrer-PolicyResponseSecurityControls how much referrer info is sent
Referrer-Policy: strict-origin-when-cross-originPermissions-PolicyResponseSecurityControls which browser features can be used
Permissions-Policy: geolocation=(), microphone=()Cross-Origin-Opener-PolicyResponseSecurityIsolates browsing context from cross-origin documents
Cross-Origin-Opener-Policy: same-originCross-Origin-Embedder-PolicyResponseSecurityPrevents loading cross-origin resources without permission
Cross-Origin-Embedder-Policy: require-corpCross-Origin-Resource-PolicyResponseSecurityPrevents other domains from loading the resource
Cross-Origin-Resource-Policy: same-siteConnectionBothConnectionControls whether network connection stays open
Connection: keep-aliveKeep-AliveBothConnectionControls how long a persistent connection should stay open
Keep-Alive: timeout=5, max=1000UpgradeBothConnectionAsks to switch to a different protocol (e.g., WebSocket)
Upgrade: websocketHostRequestRequest ContextDomain name of the server and TCP port number
Host: www.example.com:443RefererRequestRequest ContextAddress of the previous page that linked to this one
Referer: https://example.com/pageUser-AgentRequestRequest ContextIdentifies the client software making the request
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)...FromRequestRequest ContextEmail address of the user making the request
From: webmaster@example.comServerResponseResponse ContextInformation about the software used by the origin server
Server: nginx/1.18.0LocationResponseResponse ContextURL to redirect a page to
Location: https://example.com/new-pageDateResponseResponse ContextDate and time the message was sent
Date: Wed, 21 Oct 2024 07:28:00 GMTRetry-AfterResponseResponse ContextHow long to wait before making a new request
Retry-After: 120CookieRequestCookiesHTTP cookies previously sent by the server
Cookie: sessionId=abc123; theme=darkSet-CookieResponseCookiesSend a cookie from server to client
Set-Cookie: id=a3fWa; Expires=Thu, 21 Oct 2024 07:28:00 GMT; Secure; HttpOnlyRangeRequestRange RequestsRequest only part of a resource
Range: bytes=200-1000Accept-RangesResponseRange RequestsWhether server supports range requests
Accept-Ranges: bytesIf-RangeRequestRange RequestsCreate conditional range request
If-Range: "67ab43"📚 Quick Reference
- • Content-Security-Policy - XSS protection
- • Strict-Transport-Security - Force HTTPS
- • X-Content-Type-Options - Prevent MIME sniffing
- • X-Frame-Options - Clickjacking protection
- • Cache-Control - Full cache control
- • ETag - Resource versioning
- • Last-Modified - Modification date
- • Vary - Cache key variations