MORTIMERDEV GUIDES / HTTP CACHING

no-cache vs no-store: why no-cache still caches

3 minute read Updated Sources checked 30 November 2026

Short answer: no-cache doesn't mean "don't cache". It means "store it, but check with the server before every use". no-store is the one that means "don't keep a copy anywhere". Use no-cache (with an ETag) for pages that must always be current, and no-store for sensitive, per-person responses.

Side by side

HeaderStored?Reused without asking the server?
no-storeNoNever: every request downloads it again
no-cacheYesNever: checked every time, usually a quick 304
max-age=0YesNot normally, but a cache may serve it stale, for example when it can't reach your server
max-age=0, must-revalidateYesNever: if the check fails, the cache returns an error instead
private, max-age=600Only in the browserYes, for 10 minutes, in the browser only

Why no-cache is usually what you want

A no-cache response is kept, and before reusing it the cache asks your server whether it's changed. With a validator, that question is cheap:

HTTP/1.1 200 OK
Cache-Control: no-cache
ETag: "v42"

Next time, the browser sends If-None-Match: "v42". If nothing changed, your server answers 304 Not Modified with no body, and the stored copy is used. Visitors always see the current version, and you only send the full page when it's actually changed.

Without an ETag or Last-Modified, the server can't answer 304, so every check downloads the whole response. That's no-store performance with none of its privacy.

When to use no-store

no-store tells every cache, the browser's included, not to keep a copy at all. Use it for responses that are personal and sensitive: account pages, banking, anything a later user of the same computer shouldn't be able to see.

  • Adding max-age or no-cache next to it does nothing: no-store wins.
  • It's not a security control on its own. It stops caches storing new copies, but anything already stored and any copy someone has saved isn't affected, and it doesn't encrypt anything.
  • It can cost you instant back and forward navigation. Browsers have traditionally kept no-store pages out of their back/forward cache. Chrome now allows it when it's safe (and evicts the page if cookies change), but other browsers may not.

Things that catch people out

  • Pragma: no-cache in a response does nothing reliable. Pragma is an old HTTP/1.0 request header; its meaning in responses was never defined. Use Cache-Control.
  • private isn't no-store. private stops CDNs and proxies storing the response, but the browser may still keep a copy on disk.
  • CDNs differ. Vercel doesn't cache no-cache responses at all. Cloudflare (on Free, Pro and Business plans) stores them and revalidates every time, as the spec intends. If your CloudFront cache policy's minimum TTL is above 0, CloudFront keeps even no-cache, no-store and private responses, and can serve that copy when your origin is unreachable (send stale-if-error=0 to prevent this).
  • The request header is different. Browsers usually send Cache-Control: no-cache on a request when you force a reload. It asks caches not to use a stored copy without checking with the server this time; the fresh response may then replace the stored one. Some CDNs, such as CloudFront, ignore it.

Pick one

ContentHeader
HTML that must always be currentCache-Control: no-cache with an ETag
Personal API responsesCache-Control: private, no-cache
Account, payment or medical pagesCache-Control: no-store
Files with a hash in their nameCache-Control: public, max-age=31536000, immutable

Paste your headers into the HTTP caching explainer to see what the browser and each CDN will actually do with them, or use the header builder to generate them for your platform.