Browser Cache Simulator

Paste HTTP response headers and see how browsers and CDNs cache the file: fresh time, when it revalidates, 304s, stale-while-revalidate and reload behaviour.

Tool

Was this tool useful?

About this tool

About Browser Cache Simulator

Caching headers are easy to get wrong. Paste Cache-Control, Expires, ETag, Last-Modified, Age and Vary headers (or start from an example) and the simulator applies the HTTP caching rules (RFC 9111) to show how long the response stays fresh, what happens on visits after 30 seconds, an hour or a month, and what the reload button does – served from cache, revalidated with a cheap 304, updated in the background, or downloaded again. Switch between the browser cache and a shared CDN cache. Also works as a Cache-Control Policy Simulator.

How it works

Freshness lifetime = s-maxage (shared caches) or max-age, else Expires − Date, else 10% of (Date − Last-Modified); minus Age. no-cache forces revalidation, no-store prevents storing, immutable skips revalidation on reload while fresh.

Example

Cache-Control: no-cache with an ETag is stored but checked every time, so repeat visits usually get a 304 Not Modified with no body.

How to use this tool

  1. Pick an example or paste your response headers.
  2. Choose browser or CDN cache and the times to test.
  3. Read the timeline and the notes.

Frequently asked questions

What header should my CSS and JS have?

With versioned file names: Cache-Control: public, max-age=31536000, immutable.

And my HTML pages?

Usually Cache-Control: no-cache plus an ETag, so changes show at once but unchanged pages cost only a 304.

Is my data uploaded?

No. Everything runs in your browser and stays on this device.

Does the Browser Cache Simulator send my data to a server?

No. The Browser Cache Simulator runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.