Learn
Cache-Control max-age vs s-maxage: Browser and CDN TTLs
Verdict, evaluated November 2026: set max-age for the browser and s-maxage for the CDN, and keep them deliberately ...
Evaluated November 2026 against RFC 9111 and current vendor documentation. The short answer on no-cache vs no-store: no-cache means "store it, but confirm with the origin before every reuse," no-store means "never write it to any cache," and private means "only the end user's browser may keep it." Use no-store only for responses that must never be persisted, such as account statements or one-time tokens. Use no-cache for HTML entry points that must always be current. Use private for per-user responses that can still be reused in the browser for 60 seconds or more.
Under RFC 9111, the HTTP caching standard in force as of 2026, a no-cache response may be stored by any cache but must be revalidated with the origin before each reuse, while a no-store response may not be stored at all. A successful no-cache revalidation returns a 304 Not Modified of a few hundred bytes instead of the full body, which is the entire performance difference between the two directives.
The behavior that catches teams out sits at the edge. Varnish's built-in logic, nginx proxy_cache and Cloudflare's default cache behavior all decline to store a response marked no-cache. On those layers, no-cache behaves like no-store, and every request becomes a full origin fetch.
Each directive answers three separate questions: may the response be stored, may it be reused without contacting the origin, and which caches the answer applies to. The table separates those questions. It also adds public with max-age=0 and must-revalidate as a reference point, because that combination is often confused with no-cache.
| Directive | Browser may store | Shared cache (CDN, proxy) may store | Reuse without origin contact | Common default at the edge |
|---|---|---|---|---|
| no-cache | Yes | Yes, per spec | Never; every reuse needs a 304 or 200 from origin | Not cached (bypass or hit-for-miss) |
| no-store | No | No | Not applicable, nothing is stored | Not cached |
| private | Yes | No | In the browser, until max-age expires | Not cached, unless a TTL floor overrides it |
| public, max-age=0, must-revalidate | Yes | Yes | Never; stale on arrival, no serving stale on origin error | Usually not cached, because TTL is zero |
The only directive that guarantees the CDN never holds a copy is no-store. no-cache and private are instructions about reuse and scope, and edge software implements them very differently from the specification.
Browsers implement both directives close to the specification. That is why the difference shows up in DevTools long before it shows up in CDN logs.
With Cache-Control no-cache, the browser stores the response with its validators (ETag or Last-Modified). On the next navigation it sends If-None-Match or If-Modified-Since. If the origin answers 304, the browser renders the stored body. The cost is one round trip, but the transfer is a few hundred bytes. no-cache without an ETag or Last-Modified is the worst combination: the browser has nothing to validate with, so every request downloads the full body.
With no-store, nothing is written to the HTTP cache, so every navigation is a full fetch. Chromium has historically excluded pages served with no-store from the back/forward cache (bfcache), which makes the back button reload the page instead of restoring it instantly. Chromium has been testing a relaxed version of this rule. Check the back/forward cache panel in DevTools instead of assuming either behavior. If you set no-store on every HTML page by habit, you pay this cost on every back navigation.
Cache-Control private keeps a response out of shared caches but lets the browser reuse it under normal freshness rules. "private, max-age=60" on a dashboard JSON call means one user's repeated tab switches cost zero requests for a minute. private is a caching instruction, not a confidentiality control. It does nothing against an intermediary that ignores it or is configured to override it.
Shared caches are allowed to be stricter than the specification, and most of them are. In practice, at the edge, no-cache usually means "do not cache."
The built-in VCL marks a backend response uncacheable if its Cache-Control contains no-cache, no-store or private (and no Surrogate-Control header is present). It then creates a hit-for-miss object that lasts 120 seconds. Requests for that object go straight to the backend without request coalescing for that window. A no-cache HTML page under load therefore fans out to origin at the full request rate.
nginx does not cache upstream responses whose Cache-Control includes no-cache, no-store or private. It also skips responses that carry Set-Cookie. The proxy_ignore_headers directive can disable this check. That fix is dangerous on shared paths because it also ignores private.
Amazon CloudFront respects no-cache, no-store and private when the cache policy's minimum TTL (time to live) is 0. If the minimum TTL is greater than 0, CloudFront caches for at least that duration even when those directives are present. A minimum TTL of 1 second set "to absorb spikes" will therefore store private responses at the edge. That is a real cross-user leak risk on authenticated paths.
Cloudflare's default cache behavior documentation states that it does not cache responses marked private, no-store, no-cache or max-age=0. Cloudflare also honors the CDN-Cache-Control header from RFC 9213. That header lets the origin give the edge a different lifetime from the one the browser sees, which is the clean way to get browser revalidation alongside edge caching.
The same split is available on BlazingCDN through configuration rather than headers. Custom configurations and cache rules are set up per zone together with an engineer, and origin shield with request coalescing is included on every plan, as listed on the BlazingCDN features page covering cache rules and origin shield.
Take one HTML entry point of 50 KB requested 2,000 times per second across the edge. That is 172.8 million requests per day. The three behaviors produce very different origin load. The figures below are arithmetic, not measurements.
The gap between the first and third lines is roughly 20,000 times in origin bytes. It comes entirely from header and edge configuration, not from hardware.
Most production mistakes come from applying a single directive site-wide. Match the directive to the content type instead:
| Content | Cache-Control to send | Edge behavior to aim for | Why |
|---|---|---|---|
| Fingerprinted JS, CSS, video segments, installers | public, max-age=31536000, immutable | Cache for a year | The URL changes when the content changes |
| HTML entry point, shared by all users | max-age=0, s-maxage=10, must-revalidate, plus ETag | 10-second edge TTL, browser revalidates | no-cache would bypass most edges |
| Live HLS or DASH playlist | public, max-age of about half the segment duration | Short TTL with request coalescing | Thousands of players poll the same object |
| Per-user API or dashboard JSON | private, max-age=0 or 60, plus ETag | Never stored; no TTL floor on this path | Browser reuse is safe; edge reuse leaks data |
| Tokens, statements, password reset pages | no-store | Never stored | Nothing may persist on shared or local disk |
no-store belongs on a small, sensitive slice of responses, not on HTML by default. Freshness for shared pages is better handled with a short s-maxage and validators.
Most shared caches give s-maxage precedence over max-age, as RFC 9111 requires, which is what makes the second row work with a single header. Where the CDN supports RFC 9213, sending "Cache-Control: no-cache" alongside "CDN-Cache-Control: max-age=10" expresses the same intent more explicitly.
Request the same URL twice through the CDN and compare the Age header with the vendor's cache status header (X-Cache, CF-Cache-Status or the equivalent). A rising Age and a HIT on the second request confirm edge storage. In the browser, the DevTools Network panel shows "(disk cache)" for fresh reuse and status 304 for successful no-cache revalidation. For authenticated paths, request with two different sessions and confirm the second session never receives an Age above zero.
No. no-cache allows a browser or CDN to store a response but requires revalidation with the origin before every reuse, while no-store forbids storing it anywhere. In browsers, no-cache usually produces cheap 304 responses when an ETag is present. Many CDNs, however, treat no-cache as uncacheable, so at the edge it often behaves like no-store.
It should, and most CDNs honor it by default, but configuration can override it. Amazon CloudFront, for example, caches responses marked private when the cache policy sets a minimum TTL above zero. Audit TTL floors and forced-caching rules on every authenticated path, because private only works when no edge rule overrides the origin's Cache-Control header.
Use neither by default for shared HTML pages; send max-age=0 with a short s-maxage and an ETag. This lets browsers revalidate on every navigation while the CDN absorbs load for a few seconds. Reserve no-store for pages with sensitive per-user data, and accept that it may disable the back/forward cache in Chromium browsers.
Most CDN and proxy defaults, including Varnish's built-in logic, nginx proxy_cache and Cloudflare's default behavior, skip storing no-cache responses rather than storing and revalidating them. The specification permits this. To cache at the edge while keeping browsers fresh, use s-maxage, the RFC 9213 CDN-Cache-Control header, or an edge cache rule for that path.
Export one day of CDN logs and group requests by Cache-Control value and cache status. Flag every no-cache response served as MISS or BYPASS, and multiply the request count by the average body size: that number is the origin egress your headers are creating. Then list every path that combines private or Authorization with a nonzero minimum TTL, and fix those first, because they are data leaks rather than performance problems. Rerun the two-session check above on each fixed path.
For high-volume static delivery where you want edge TTLs set independently of browser headers, BlazingCDN zones are configured together with an engineer, and onboarding on the BlazingCDN Anycast CDN with custom cache rules takes about one hour.
Heavy traffic.
Light bill.
The CDN for video and large traffic
Learn
Verdict, evaluated November 2026: set max-age for the browser and s-maxage for the CDN, and keep them deliberately ...
Learn
A CloudFront invalidation removes cached objects from every Amazon CloudFront cache layer before their TTL expires. As ...
Learn
A global CDN has to keep cached bytes within roughly 20 to 40 ms of round-trip time from users on every continent you ...
Learn
Multi-CDN means serving the same hostnames and content through two or more CDN providers at once, with a steering layer ...