Reference

HTTP Headers Reference — Complete List with Examples

Reference for all common HTTP headers: request, response, security, caching, CORS, content negotiation. With practical examples and modern best practices.

Reference of common HTTP headers grouped by purpose. The full IANA HTTP registry has 200+; this is the practical subset web developers, API designers, and DevOps engineers see daily.

General request headers

HeaderPurposeExample
AcceptAcceptable response typesAccept: application/json
Accept-EncodingAcceptable compressionAccept-Encoding: gzip, br
Accept-LanguagePreferred languageAccept-Language: en-US,en;q=0.9
AuthorizationAuth credentialsAuthorization: Bearer eyJhbGc...
Cache-ControlCaching directivesCache-Control: no-cache
Content-LengthBody size in bytesContent-Length: 4523
Content-TypeBody media typeContent-Type: application/json
CookieCookies sent to serverCookie: session=abc123
HostTarget hostname (required HTTP/1.1)Host: api.example.com
If-MatchConditional update by ETagIf-Match: "v3"
If-Modified-SinceConditional GET by dateIf-Modified-Since: Wed, 21 Oct 2025 07:28:00 GMT
If-None-MatchConditional GET by ETagIf-None-Match: "abc"
OriginOrigin of cross-origin requestOrigin: https://app.example.com
RangeRequest partial contentRange: bytes=0-1023
RefererURL that triggered requestReferer: https://google.com/
User-AgentClient identifierUser-Agent: Mozilla/5.0...

General response headers

HeaderPurposeExample
Cache-ControlCaching directives for client + CDNCache-Control: public, max-age=31536000, immutable
Content-DispositionDownload / inline displayContent-Disposition: attachment; filename="report.pdf"
Content-EncodingCompression applied to bodyContent-Encoding: gzip
Content-LanguageBody languageContent-Language: en
Content-LengthBody size in bytesContent-Length: 1024
Content-TypeBody media typeContent-Type: text/html; charset=utf-8
ETagResource version identifierETag: "abc123"
ExpiresAbsolute expiration date (legacy)Expires: Wed, 21 Oct 2025 07:28:00 GMT
Last-ModifiedResource's last modification dateLast-Modified: Wed, 21 Oct 2025 07:28:00 GMT
LocationRedirect target / created resourceLocation: /users/42
Retry-AfterWhen to retry (429/503)Retry-After: 120
Set-CookieSet browser cookieSet-Cookie: session=abc; HttpOnly; Secure
ServerServer softwareServer: nginx/1.25
VaryHeaders that affect cached representationVary: Accept-Encoding, Accept-Language
WWW-AuthenticateAuth challenge (401)WWW-Authenticate: Bearer realm="api"

Security headers

These should be set on every response from a modern web app:

HeaderPurposeRecommended value
Strict-Transport-SecurityForce HTTPSmax-age=31536000; includeSubDomains; preload
Content-Security-PolicyRestrict resource originsdefault-src 'self'; script-src 'self' 'unsafe-inline'
X-Content-Type-OptionsPrevent MIME-sniffingnosniff
X-Frame-OptionsPrevent clickjackingSAMEORIGIN (or use CSP frame-ancestors)
Referrer-PolicyControl referer leakagestrict-origin-when-cross-origin
Permissions-PolicyRestrict browser APIscamera=(), microphone=(), geolocation=()
Cross-Origin-Embedder-PolicyRequired for SharedArrayBufferrequire-corp
Cross-Origin-Opener-PolicyIsolate browsing contextsame-origin
Cross-Origin-Resource-PolicyRestrict cross-origin loadingsame-origin or cross-origin

CORS headers

Set on responses to cross-origin requests. See the CORS glossary entry for the full mechanism.

HeaderPurpose
Access-Control-Allow-OriginWhich origin may read the response (* for any)
Access-Control-Allow-CredentialsWhether cookies may be sent (must be true + specific origin)
Access-Control-Allow-MethodsAllowed HTTP methods (preflight)
Access-Control-Allow-HeadersAllowed request headers (preflight)
Access-Control-Max-AgePreflight cache duration in seconds
Access-Control-Expose-HeadersCustom response headers visible to JS

Conditional / caching headers — quick reference

  • Strong validators: ETag, Last-Modified
  • Conditional GET: If-None-Match + If-Modified-Since → 304 if unchanged
  • Conditional update (optimistic locking): If-Match with ETag → 412 if changed
  • Force fresh: Cache-Control: no-cache (must revalidate)
  • Don't cache at all: Cache-Control: no-store
  • Cache forever (immutable assets): Cache-Control: public, max-age=31536000, immutable

Related tools

HTTP status code reference: tool + cheat sheet. Decode JWT bearer tokens: JWT decoder. Encode special characters: URL encoder, Base64.

Featured Tools

Try these free tools directly in your browser — no sign-up required.

http headers list http headers reference request headers response headers security headers cors headers

Explore 300+ Free Tools

Utilko has tools for developers, writers, designers, students, and everyday users — all free, all browser-based.