HTTP Response Headers

Common HTTP response headers and their purposes.

  • JSON6,254 B
  • YAML4,413 B · −29%
  • TOON3,427 B · −45%

Common HTTP response headers with a description and an example value: Content-Type, Content-Length, Cache-Control, Set-Cookie, ETag, Location and CORS headers, plus the security headers HSTS, CSP, X-Content-Type-Options, Referrer-Policy and Permissions-Policy.

Use it when

  • You need the meaning and format of a response header.
  • You are hardening a site with security headers.

Watch out for

  • Security headers need testing; for example a Content-Security-Policy can break inline scripts and third-party widgets.
  • Headers can be modified or added by proxies and CDNs between the server and the client.

The data

HeaderDescriptionExample
Content-TypeMedia type of the response body.application/json; charset=utf-8
Content-LengthSize of the response body in bytes.2048
Content-EncodingEncoding applied to the body.gzip, br
Cache-ControlCaching directives for the response.public, max-age=86400
Set-CookieSends a cookie to the client.session=abc123; HttpOnly; Secure
ETagIdentifier for a specific version of the resource."33a64df5"
Last-ModifiedDate and time the resource was last modified.Wed, 21 Oct 2026 07:28:00 GMT
LocationURL to redirect to.https://api.example.com/users/42
WWW-AuthenticateAuthentication method required.Bearer realm="api"
Access-Control-Allow-OriginAllowed origins for CORS.https://example.com
X-RateLimit-RemainingRemaining requests in the current window.47
Retry-AfterSeconds to wait before retrying after 429.300
Strict-Transport-SecurityTells browsers to use HTTPS only for the site for a period, preventing protocol downgrade.max-age=31536000; includeSubDomains
Content-Security-PolicyRestricts which sources scripts, styles and other resources may load from, limiting injection attacks.default-src 'self'; img-src https:
X-Content-Type-OptionsStops browsers from guessing content types, reducing MIME-sniffing attacks.nosniff
Referrer-PolicyControls how much referrer information is sent with requests.strict-origin-when-cross-origin
Permissions-PolicyEnables or disables browser features such as camera or geolocation for the page and embedded frames.geolocation=(), camera=()
VaryLists request headers that change the response, so caches store separate variants.Accept-Encoding, Accept-Language
Content-DispositionSuggests whether to display content inline or download it, and the filename.attachment; filename="report.csv"
Alt-SvcAdvertises alternative endpoints or protocols, such as HTTP/3, for the same origin.h3=":443"; ma=86400
AgeThe time in seconds the response has been in a shared cache.120
LinkProvides related resources, such as preload hints, relations and pagination links.</style.css>; rel=preload; as=style

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
dataheaderstringContent-Type
datadescriptionstringMedia type of the response body.
dataexamplestringapplication/json; charset=utf-8

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.yunusemrevurgun.com/api/dataset/http-response-headers?format=toon"
const res = await fetch(
  "https://yjtoon.yunusemrevurgun.com/static-data/dataset/http-response-headers.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • web
  • http
  • headers
  • response
  • api

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets