Skip to content

Cache headers checker. A-F caching grade.

Paste HTTP response headers. The checker parses every Cache-Control directive (max-age, s-maxage, public, private, no-cache, no-store, must-revalidate, immutable, stale-while-revalidate), validates ETag and Last-Modified, checks Expires + Pragma legacy headers, and produces an A-F caching grade per RFC 9111.

cache grade
-
Paste headers to grade.
directives parsed
-
validators
-
recommendations
-
Sources used

No data is sent to any external service. Parsing happens entirely in your browser; the source links above are RFC + reference documentation only.

Privacy: parsing happens in your browser. Nothing is sent or logged.

§ · written guide

How to use the Cache Headers Checker

This checker reads the HTTP response headers you paste and grades how well the response is set up for caching, from A to F. It parses the Cache-Control directives, looks for the ETag and Last-Modified validators, notes legacy Expires and Pragma headers, and lists what to fix. It is for developers and site owners tuning how browsers and CDNs cache their pages and files.

Step by step

  1. Copy the response headers

    Run curl -I with the URL in a terminal, or open your browser DevTools, pick the request in the Network tab and copy the response headers in their raw form. Each header needs to sit on its own line as name: value.

  2. Paste them into the box

    Paste them into the text box, which sits on the left on a wide screen. The grade updates as you type or paste, with no button to press. Only lines that start with the header name are read, so leading spaces stop a header from being found.

  3. Or load a sample

    Press Immutable asset (good), HTML with SWR, No-store (API) or No cache headers to load an example and see how each pattern scores. Press clear to empty the box.

  4. Read the grade and verdict

    The cache grade shows a letter from A to F, and the sentence beside it sums up the strategy. The panels below it show the directives parsed, the validators found and the recommendations.

  5. Fix and check again

    Change the headers on your server or CDN, copy the new response headers and paste them in again to confirm the grade moved.

Reading the result

  • The grade comes from a score out of 100: A is 90 or more, B is 80 or more, C is 70 or more, D is 60 or more, and anything lower is F. A response with no Cache-Control header is always F.
  • Points come from public (private earns a little less), a max-age (with a bonus for a year or more, 31536000 seconds), s-maxage, immutable, stale-while-revalidate and must-revalidate. Leaving out max-age costs points and max-age=0 costs some too. A no-cache response without no-store starts from a fixed 75.
  • The Immutable asset (good) sample, public with max-age=31536000 and immutable, scores 95 and gets an A. The No-store (API) sample is fixed at a C, because no-store is right for private data but switches caching off.
  • Validators shows whether ETag, Last-Modified or both are present. With neither, every revalidation is a full download, and the score drops by 10.
  • Expires and Pragma are listed under directives parsed as legacy headers. They do not change the score, because Cache-Control takes priority when both are present.

Tips and common mistakes

  • Paste the headers of the exact file you care about. An HTML page, a versioned script and an API response each need a different policy, so check them one by one.
  • Only the first Cache-Control line is read. If a proxy or CDN adds a second one, check what the browser actually receives.
  • no-cache does not mean do not cache. It means check with the server before reuse. Use no-store when the response must never be stored.
  • A max-age of a year or more without immutable gets a recommendation to add immutable, which only makes sense for files whose URL changes when their content changes.
  • If public and private both appear, the checker flags the conflict. Pick one.

Privacy and limits

The checker never contacts the URL. It only reads the text you paste, and the parsing runs in your browser. Nothing is sent, logged or saved, so closing the tab clears it. The links under Sources used point to the RFCs and reference docs the rules come from.

Back to the tool

§ 02 · what cache headers control

Caching is a directive language.

HTTP caching is governed by RFC 9111 via the Cache-Control response header and its directive vocabulary: max-age, s-maxage, public, private, no-cache, no-store, must-revalidate, immutable, stale-while-revalidate. Each directive has a precise meaning that browsers and CDNs implement consistently. The checker above parses every directive, validates ETag and Last-Modified pairing, flags conflicting directives, and produces a letter-grade audit. Most production caching bugs are misuse of no-cache (often confused with no-store), missing s-maxage on public responses, or missing immutable on versioned assets.

Three rules of thumb. Versioned static assets (file.abc123.js): max-age=31536000, immutable, content-addressed URLs never need revalidation. HTML: short max-age (300s) + stale-while-revalidate (86400s), fast for repeat visits, freshness on background refresh. API JSON: no-store unless explicitly cacheable; if cacheable, short max-age + private to keep responses out of CDN. The web.dev HTTP cache guide is the canonical practical reference.

Tools in the same cluster: HTTP Headers Checker for the broader headers grade. CDN Detector for the edge tier (which respects s-maxage). Compression Detector for Vary: Accept-Encoding correctness.

§ 03 · questions

Five answers.

What headers control HTTP caching?

Cache-Control is the modern primary header (RFC 9111). It carries directives: max-age (browser cache TTL in seconds), s-maxage (CDN/proxy TTL), public (cacheable by any cache), private (browser only, not CDN), no-cache (revalidate before use), no-store (do not cache at all), must-revalidate (revalidate when stale), immutable (resource will never change), stale-while-revalidate (serve stale while fetching fresh in background). ETag and Last-Modified support conditional requests. Expires (HTTP/1.0 legacy) and Pragma still ship for backward compat but Cache-Control wins on conflict.

What's a healthy cache strategy by resource type?

HTML: short TTL (Cache-Control: public, max-age=300, s-maxage=600, stale-while-revalidate=86400), content changes often. Versioned JS/CSS (file.abc123.js): long-immutable (Cache-Control: public, max-age=31536000, immutable), file URL changes when content changes. Unversioned JS/CSS: short TTL with revalidate (max-age=600, must-revalidate). Images (versioned): max-age=31536000, immutable. API JSON: typically no-store or short max-age=60 with private. Static assets at edge: s-maxage=86400+ for CDN benefit.

Why does my cache grade say no caching headers found?

Without Cache-Control, browsers fall back to heuristic caching (typically 10% of (Date - Last-Modified), capped at a few minutes). CDNs may not cache at all without explicit Cache-Control. The result: every request hits origin, TTFB suffers, bandwidth costs balloon. Add at minimum a Cache-Control: public, max-age=N to every cacheable response. The grade above flags missing headers as a critical issue.

ETag or Last-Modified, should I ship both?

Either one enables conditional requests (304 Not Modified responses that save bandwidth). ETag is more precise, it changes when the resource changes regardless of timestamp. Last-Modified is timestamp-based, simpler to generate. Most servers ship both; on conflict, ETag wins per RFC 9110. Modern setup: ETag for dynamic content, Last-Modified for static files. The checker above flags missing both as a missed conditional-request opportunity.

Does this tool save my data?

No. Header parsing happens in your browser. Nothing is sent to any server. Closing the tab clears the data. The Copy Results button puts a plain-text summary on your clipboard.

§ 04 · cache strategy audit

Cache grade below B?

Our web development engagements ship Cache-Control + ETag + Vary correctness across HTML, JS, CSS, and image asset tiers, typically a 30-50% TTFB improvement on cached requests.

Published .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply