Skip to tool
HTTP Caching & Edge Delivery Diagnostics

Cache-Control Header Checker

Inspect, decode, and optimize HTTP Cache-Control headers for any webpage, stylesheet, script, or API. Audit browser vs CDN edge TTL, stale-while-revalidate, ETag validators, and generate production server configurations.

  • Decode max-age, s-maxage, stale-while-revalidate, & immutable directives
  • Detect intermediate CDN cache hits/misses (Cloudflare, Fastly, CloudFront, Vercel)
  • Copy-paste server configuration snippets for Nginx, Apache, Cloudflare, Next.js, & Caddy

Knowledge base

Understand the signal behind the score

Practical context to help you turn the output into faster, more reliable experiences.

The Two-Tier Architecture: Browser Cache vs. CDN Edge (s-maxage)

Modern web delivery relies on two distinct caching layers: the visitor's local browser disk/memory cache and the global CDN edge network.

By combining max-age and s-maxage, you can achieve the best of both worlds. For example, setting Cache-Control: public, max-age=0, s-maxage=86400, stale-while-revalidate=604800 allows your CDN edge to absorb 99% of global traffic with instantaneous edge hits, while visitor browsers always revalidate with the CDN edge to guarantee prompt updates upon publishing new content.

stale-while-revalidate: Zero-Latency Dynamic Caching

Traditional caching forced developers into a difficult trade-off: either cache aggressively and serve stale data, or bypass the cache and incur high origin server latency on every request.

stale-while-revalidate completely resolves this dilemma. The client receives the cached copy immediately with sub-millisecond response times, while the browser or edge network fetches the updated document asynchronously in the background. Pairing this with stale-if-error ensures your site remains online even during origin backend outages.

The Immutable Rule for Hashed Static Assets

Modern bundlers (Webpack, Vite, Turbopack, Next.js) output fingerprinted asset filenames such as framework-a8b2c4.js. Because the filename changes whenever the code changes, there is zero risk of visitors being stuck on an outdated version.

Static assets should always declare Cache-Control: public, max-age=31536000, immutable. The immutable token instructs browsers never to send conditional 304 revalidation checks when the user reloads the page, saving valuable RTT handshakes on mobile connections.

ETag Validation: Squeezing Maximum Bandwidth Efficiency

When a cached resource expires, the browser shouldn't automatically re-download megabytes of identical data.

The ETag (Entity Tag) acts as a cryptographic fingerprint of the resource content. When revalidating, the browser sends If-None-Match: "etag-value". If unchanged, the server responds with a lightweight 304 Not Modified header containing no response body, saving data plans and battery life.

Frequently Asked Questions