HTTP Headers Reference
Common HTTP headers — request, response, CORS, and security.
41 of 41
Accept RequestMedia types the client accepts.
application/json
Accept-Encoding RequestAcceptable content encodings.
gzip, br
Accept-Language RequestPreferred response languages.
en-US,en;q=0.9
Authorization RequestCredentials for authentication.
Bearer eyJhbGciOiJIUzI1NiIsInR...
Cookie RequestCookies stored for the host.
session=abc; theme=dark
Host RequestTarget host (HTTP/1.1 required).
api.example.com
If-Modified-Since RequestConditional GET — only return if modified after.
Tue, 01 Jan 2024 00:00:00 GMT
If-None-Match RequestConditional GET on ETag.
"33a64df5"
Origin RequestOrigin of the request (CORS).
https://example.com
Range RequestRequest a byte range.
bytes=0-1023
Referer RequestURL the request was made from.
https://example.com/page
User-Agent RequestIdentifies the client software.
Mozilla/5.0 ...
X-Forwarded-For RequestClient IP through a proxy chain.
203.0.113.1, 198.51.100.2
X-Requested-With RequestDistinguishes XHR / fetch.
XMLHttpRequest
Cache-Control BothCaching directives.
public, max-age=3600, immutable
Content-Encoding BothCompression applied to body.
gzip
Content-Length BothBody size in bytes.
256
Content-Type BothMedia type of the body.
application/json; charset=utf-8
Access-Control-Allow-Origin ResponseAllowed origin for CORS.
*
Access-Control-Allow-Methods ResponseAllowed HTTP methods.
GET, POST, PUT
Access-Control-Allow-Headers ResponseAllowed request headers.
Content-Type, Authorization
Access-Control-Allow-Credentials ResponseAllow credentials over CORS.
true
Access-Control-Max-Age ResponsePreflight cache duration in seconds.
86400
ETag ResponseIdentifier for a specific resource version.
"686897696a7c876b7e"
Expires ResponseDate/time after which response is stale.
Wed, 01 Jan 2025 00:00:00 GMT
Last-Modified ResponseLast modification date of the resource.
Tue, 15 Nov 2024 12:45:26 GMT
Location ResponseRedirect target or new resource URL.
/login
Retry-After ResponseSeconds (or date) to wait before retrying.
120
Server ResponseOrigin server software.
nginx/1.25.1
Set-Cookie ResponseSets cookies on the client.
session=abc; HttpOnly; Secure; SameSite=Strict
Vary ResponseHeaders that affect cache key.
Accept-Encoding, User-Agent
WWW-Authenticate ResponseRequired auth scheme.
Basic realm="example"
Content-Security-Policy SecurityCSP directives.
default-src 'self'
Strict-Transport-Security SecurityEnforce HTTPS (HSTS).
max-age=63072000; includeSubDomains; preload
X-Content-Type-Options SecurityDisable MIME sniffing.
nosniff
X-Frame-Options SecurityIframe embedding policy.
DENY
Referrer-Policy SecurityReferer header policy.
strict-origin-when-cross-origin
Permissions-Policy SecurityBrowser feature permissions.
geolocation=(), camera=()
Cross-Origin-Opener-Policy SecurityCross-origin opener policy.
same-origin
Cross-Origin-Embedder-Policy SecurityCross-origin embedder policy.
require-corp
Cross-Origin-Resource-Policy SecurityCross-origin resource policy.
same-origin