How HTTP Works

Reference

HTTP Headers

Use this when you can see a header name in logs, DevTools, or curl, but need to know whether it explains the behavior you are seeing.

Caching and validation

Freshness, validators, and conditional requests.

Content and negotiation

What the body is and what the client can accept.

CORS

Cross-origin resource sharing and preflight.

Security and policy

Browser-enforced protections and isolation.

Authentication

Credentials and challenges.

Cookies

Browser state in both directions.

Connection and proxies

Hop-by-hop behavior, forwarding, and upgrades.

Ranges and redirects

Partial content and navigation.

Diagnostics and rate limits

Identification, timing, and throttling.

Other

Headers that do not fit the groups above.

What HTTP Headers Tell You

If you are staring at a response in DevTools or `curl`, headers are often the fastest explanation for what happened. They tell you what the client asked for, what the server decided, and which intermediaries changed the rules along the way.

Request headers
These explain what the client wants or already knows, like accepted formats, cached versions, auth credentials, or origin context.
Response headers
These explain the server decision: content type, cache policy, redirect target, cookie instructions, or a challenge the client must answer.
General and hop-by-hop headers
Some fields are really about the trip, not the resource. They show up most often when proxies, gateways, and connection behavior are involved.
Policy headers
Headers like CSP, HSTS, and Permissions-Policy are not passive metadata. Browsers enforce them, and small mistakes have visible consequences.

Fast Ways To Narrow The Problem

When you do not know the header name yet, start from the behavior you are trying to explain.

  • For caching bugs, start with Cache-Control, ETag, Expires, Vary, and Last-Modified.
  • For auth or CORS bugs, look at Authorization, WWW-Authenticate, Origin, and the Access-Control-* fields together.
  • For browser security behavior, check CSP, HSTS, Referrer-Policy, Permissions-Policy, and cookie-related headers in one pass.

Questions From Debugging Sessions

What is the fastest way to debug an unfamiliar header?

Figure out three things first: who sent it, whether it changes browser behavior or server behavior, and which decision it affects: caching, auth, redirects, cookies, or security policy.

Which headers should I check first for a caching problem?

Usually Cache-Control, ETag, Expires, Last-Modified, Age, and Vary. Those six explain most “why did I get stale or uncached content?” investigations.

Do proxies and CDNs change how headers behave?

Yes. Proxies and CDNs can add, strip, normalize, or reinterpret headers, especially around forwarding, compression, caching, and security controls.

Browse /search