Reference

HTTP headers.

The request, response and security headers you'll actually set or read.

Tap any row to copy the value in the first column.

Common (request & response)

HeaderUsed for
Content-TypeFormat of the body (e.g. application/json)
Content-LengthSize of the body in bytes
Cache-ControlCaching rules (max-age, no-store)
ConnectionKeep the connection alive or close it

Request headers

HeaderUsed for
AcceptMedia types the client will accept
Accept-EncodingCompression the client supports (gzip, br)
AuthorizationCredentials — Bearer token or Basic auth
CookieCookies sent back to the server
HostTarget domain of the request
OriginOrigin of a cross-site request (CORS)
RefererPage the request came from
User-AgentClient browser or app identity
If-None-MatchConditional request using an ETag

Response headers

HeaderUsed for
Content-EncodingCompression applied to the body
ETagVersion identifier for caching
LocationRedirect target or new resource URL
Set-CookieTell the client to store a cookie
Last-ModifiedWhen the resource last changed
Retry-AfterWhen to retry (429 or 503)
WWW-AuthenticateAuth scheme to use after a 401
Access-Control-Allow-OriginCORS — origins allowed to read the response

Security headers

HeaderUsed for
Strict-Transport-SecurityForce HTTPS (HSTS)
Content-Security-PolicyRestrict where resources can load from
X-Content-Type-OptionsBlock MIME sniffing (nosniff)
X-Frame-OptionsClickjacking protection (DENY)
Referrer-PolicyControl how much Referer is sent
Permissions-PolicyAllow or deny browser features

What headers do

HTTP headers are the key-value metadata that travels with every request and response, separate from the body. They negotiate the details of the exchange: the client uses headers to say what it accepts and who it is, and the server uses them to describe what it's sending and how to cache it. A few you'll meet constantly: Content-Type declares the body format, Authorization carries the token or credentials, Cache-Control governs caching, and Set-Cookie / Cookie handle sessions. The security headers are a separate cluster worth knowing — HSTS, CSP and the X- headers harden a site against downgrade attacks, content sniffing and clickjacking. When something behaves oddly across origins, the CORS headers (Origin and Access-Control-Allow-Origin) are usually involved. For the codes that accompany these, see HTTP status codes.

FAQ

What's the difference between request and response headers?
Request headers are sent by the client and describe the request and the client (Accept, Authorization, User-Agent). Response headers are sent by the server and describe the response (Content-Type, Cache-Control, Set-Cookie). A few, like Content-Type, appear in both.
Which header carries an authentication token?
Authorization. For a token it's usually "Authorization: Bearer "; for username/password it's "Authorization: Basic ". The server may prompt with WWW-Authenticate on a 401.

More references