Accept
RequestContent negotiation
The media types the client can handle.
Accept: application/jsonCommon HTTP request and response headers explained, with examples, plus a checker for your site’s security headers.
73 headers
Content negotiation
The media types the client can handle.
Accept: application/jsonContent negotiation
The compression formats the client supports.
Accept-Encoding: gzip, deflate, br, zstdContent negotiation
The languages the user prefers, in order.
Accept-Language: en-IN, en;q=0.9, hi;q=0.8Range requests
Says whether the server supports range requests.
Accept-Ranges: bytesCORS
Whether the browser may send cookies or credentials and expose the response.
Access-Control-Allow-Credentials: trueCORS
The request headers allowed for a cross-origin request.
Access-Control-Allow-Headers: Content-Type, AuthorizationCORS
The methods allowed for a cross-origin request, sent in reply to a preflight.
Access-Control-Allow-Methods: GET, POST, PUT, DELETECORS
Which origin may read the response in a browser.
Access-Control-Allow-Origin: https://app.example.com* cannot be used together with credentials (cookies or Authorization).
CORS
Response headers that browser JavaScript may read.
Access-Control-Expose-Headers: X-Request-Id, LinkCORS
How long the browser may cache the preflight result, in seconds.
Access-Control-Max-Age: 86400CORS
Sent in a preflight to ask whether headers are allowed.
Access-Control-Request-Headers: Content-Type, AuthorizationCORS
Sent in a preflight to ask whether a method is allowed.
Access-Control-Request-Method: PUTCaching
How many seconds the response has been in a shared cache such as a CDN.
Age: 3600Redirects and requests
The methods a resource supports, sent with 405.
Allow: GET, HEAD, OPTIONSConnection
Advertises another way to reach the same service, such as HTTP/3.
Alt-Svc: h3=":443"; ma=86400Authentication
Credentials that prove who the client is, such as a bearer token or Basic username and password.
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9…Never log it in full. Basic credentials are only Base64-encoded, so always use HTTPS.
Caching
Rules for how browsers and CDNs may cache the response, and for how long.
Cache-Control: public, max-age=31536000, immutableUse no-store for private data, no-cache to always revalidate, and long max-age with immutable for fingerprinted files.
Caching
Asks the browser to clear cookies, storage or cache for the site, for example on sign-out.
Clear-Site-Data: "cache", "cookies", "storage"Connection
Whether to keep the connection open after the request (HTTP/1.1 only).
Connection: keep-aliveContent
Whether to show the body in the browser or download it, and the suggested file name.
Content-Disposition: attachment; filename="invoice-0042.pdf"Content
How the body is compressed.
Content-Encoding: brContent
The language of the content for the reader.
Content-Language: en-INContent
The size of the body in bytes.
Content-Length: 348Content
Another URL where the returned representation can be found.
Content-Location: /documents/foo.jsonRange requests
Which part of the resource this partial (206) response contains.
Content-Range: bytes 0-1023/146515Security
Limits where scripts, styles, images and frames may load from. The strongest defence against XSS.
Content-Security-Policy: default-src 'self'; img-src 'self' data:; frame-ancestors 'none'Security
Tests a CSP by reporting violations without blocking anything.
Content-Security-Policy-Report-Only: default-src 'self'; report-to cspContent
The media type of the body, and often its character set.
Content-Type: application/json; charset=utf-8A wrong Content-Type is a common cause of 400 and 415 errors.
Cookies
Cookies the browser sends back to the server.
Cookie: session=abc123; theme=darkSecurity
Only allows cross-origin resources that explicitly opt in; needed for some powerful features.
Cross-Origin-Embedder-Policy: require-corpSecurity
Isolates your window from pop-ups and openers on other origins.
Cross-Origin-Opener-Policy: same-originSecurity
Which sites may load this resource.
Cross-Origin-Resource-Policy: same-siteProxies and client info
The old “Do Not Track” signal, now largely ignored. Global Privacy Control (Sec-GPC) replaced it.
DNT: 1Caching
A version identifier for the resource, used to check whether a cached copy is still current.
ETag: "33a64df551425fcc55e4d42a148795d9"Redirects and requests
Asks the server to confirm before the client sends a large body.
Expect: 100-continueCaching
A date after which the response is stale. Cache-Control max-age takes priority.
Expires: Wed, 21 Oct 2026 07:28:00 GMTProxies and client info
The standard replacement for the X-Forwarded-* headers.
Forwarded: for=203.0.113.7; proto=https; host=www.example.comProxies and client info
The domain (and port) the request is for. Required in HTTP/1.1.
Host: api.example.comRedirects and requests
A unique key so a retried POST is not processed twice, for example a payment.
Idempotency-Key: 4f8e2a1c-…Conditional requests
Only perform the update if the ETag matches, which prevents overwriting someone else’s change.
If-Match: "33a64df551425fcc55e4d42a148795d9"Conditional requests
Only send the resource if it changed after this date; otherwise reply 304.
If-Modified-Since: Tue, 06 Oct 2026 10:00:00 GMTConditional requests
Only send the resource if its ETag is different; otherwise reply 304.
If-None-Match: "33a64df551425fcc55e4d42a148795d9"Conditional requests
Only perform the request if the resource has not changed since this date.
If-Unmodified-Since: Tue, 06 Oct 2026 10:00:00 GMTConnection
Hints for how long and how many requests a persistent connection should last.
Keep-Alive: timeout=5, max=1000Caching
When the resource last changed. Used with If-Modified-Since.
Last-Modified: Tue, 06 Oct 2026 10:00:00 GMTContent
Links to related resources, such as preload hints or pagination.
Link: </css/app.css>; rel=preload; as=styleRedirects and requests
Where to go next, for redirects (3xx) and newly created resources (201).
Location: https://example.com/new-pageCORS
The scheme, host and port the request comes from. Browsers add it to cross-origin requests.
Origin: https://app.example.comSecurity
Turns browser features such as camera, microphone and location on or off for the page and its frames.
Permissions-Policy: camera=(), microphone=(), geolocation=()Caching
An old HTTP/1.0 cache header. Use Cache-Control instead.
Pragma: no-cacheAuthentication
Sent with 407 to say how to authenticate with the proxy.
Proxy-Authenticate: Basic realm="proxy"Authentication
Credentials for a proxy server between the client and the destination.
Proxy-Authorization: Basic dXNlcjpwYXNzRange requests
Asks for only part of the resource, for resumable downloads and video.
Range: bytes=0-1023Proxies and client info
The page that linked to this request (the spelling mistake is part of the standard).
Referer: https://example.com/pricingSecurity
How much of the current URL is sent as the Referer when users follow links.
Referrer-Policy: strict-origin-when-cross-originRedirects and requests
How long to wait before retrying, with 429 or 503.
Retry-After: 120Proxies and client info
Global Privacy Control: the user asks sites not to sell or share their data.
Sec-GPC: 1Proxies and client info
The software that handled the request.
Server: nginxLeaving out version numbers gives attackers less to go on.
Cookies
Asks the browser to store a cookie.
Set-Cookie: session=abc123; Path=/; Secure; HttpOnly; SameSite=LaxSession cookies should be Secure, HttpOnly and SameSite=Lax or Strict.
Security
Tells browsers to use only HTTPS for the site from now on (HSTS).
Strict-Transport-Security: max-age=63072000; includeSubDomains; preloadContent
How the body is sent, usually chunked when its length is not known in advance (HTTP/1.1 only).
Transfer-Encoding: chunkedConnection
Asks to switch to another protocol on the same connection, such as WebSocket.
Upgrade: websocketProxies and client info
Identifies the browser, app or tool making the request.
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)…Caching
Which request headers change the response, so caches keep separate copies.
Vary: Accept-Encoding, Accept-LanguageVary: * or Vary: Cookie can make a CDN cache almost useless.
Proxies and client info
Proxies the message passed through.
Via: 1.1 varnish, 1.1 cloudfrontAuthentication
Sent with 401 to say which authentication scheme the server expects.
WWW-Authenticate: Bearer realm="api", error="invalid_token"Security
Stops browsers guessing a different content type than the one declared.
X-Content-Type-Options: nosniffProxies and client info
The original client IP address when the request passed through proxies or load balancers.
X-Forwarded-For: 203.0.113.7, 70.41.3.18Easy to fake: only trust it when your own proxy sets it.
Proxies and client info
The original Host requested by the client before a proxy.
X-Forwarded-Host: www.example.comProxies and client info
Whether the client used HTTP or HTTPS before a proxy.
X-Forwarded-Proto: httpsSecurity
Stops other sites showing your pages in a frame (clickjacking). CSP frame-ancestors is the modern replacement.
X-Frame-Options: DENYProxies and client info
A unique ID that follows a request through your services, for tracing and support.
X-Request-ID: 7f2c1a9e-3b4d-4c1f-9a2e-8b6d5c4e3f21Security
An old browser XSS filter, now removed from browsers. Use a Content Security Policy instead.
X-XSS-Protection: 0No headers match your search.
HTTP headers carry the extra information that travels with every request and response: who the client is, what formats it accepts, how long a response may be cached, which sites may read it and much more. Getting a few of them right makes a site faster and much safer.
This reference explains the headers developers use most, grouped by purpose (caching, CORS, cookies, security, authentication and so on), each with a real example. Paste the response headers of your own site into the checker to see which security headers are missing and what to add.
At least Strict-Transport-Security (HTTPS only), Content-Security-Policy (blocks injected scripts), X-Content-Type-Options: nosniff, a Referrer-Policy and a frame policy (CSP frame-ancestors or X-Frame-Options). Permissions-Policy is a good addition.
Open your browser’s developer tools, go to the Network tab, reload the page and click the first request to see its response headers. On the command line, run curl -I https://example.com.
no-cache lets the browser keep a copy but makes it check with the server (revalidate) before each use. no-store forbids keeping a copy at all, which is right for private data such as account pages.
The browser blocks reading a cross-origin response unless the server sends Access-Control-Allow-Origin for your origin. For requests with custom headers or methods like PUT, the server must also answer the OPTIONS preflight with Allow-Methods and Allow-Headers.
Last updated · Free, no sign-up, runs in your browser.
No paywall, no sign-up and no watermarks. If a tool saved you time, you can chip in any amount by UPI to keep Nova Free Tools running.