What the headers tell you
Response headers are the instructions a server sends with every page. A few to look for first:
- Cache-Control, ETag, Age: whether browsers and CDNs may cache the response and for how long.
no-storeon static files makes every visit slower;max-ageon personalised pages can leak one user's page to another. - Content-Type: what the body is. Wrong types break scripts and styles, especially with
X-Content-Type-Options: nosniff. - Set-Cookie: cookies and their flags. Session cookies should be
Secure; HttpOnly; SameSite. - Access-Control-Allow-Origin: CORS. If a browser call fails with a CORS error, the answer is here; see the CORS error guide.
- Server, X-Powered-By, Via, CF-Ray: what is answering: the web server, framework, CDN and cache status.
Debugging with headers
Headers explain many problems that look mysterious from the browser. A page that will not update usually has a long max-age or a CDN cache hit (Age, CF-Cache-Status: HIT, X-Cache). A login that does not stick often has a cookie without Secure on HTTPS, or with the wrong Domain. A slow page with Vary: * or Vary: Cookie may be bypassing the CDN entirely.
The checker shows headers per redirect hop, because a redirect response has its own headers, including its own caching and HSTS.
Headers and security
Six headers do most of the security work in a browser: Strict-Transport-Security, Content-Security-Policy, X-Frame-Options (or frame-ancestors), X-Content-Type-Options, Referrer-Policy and Permissions-Policy. The security headers checker grades them and shows the exact header to add for each gap.