concept Delivery & performance
Browser cache
Learn when a browser can reuse a response, revalidate it, or must fetch it again under HTTP caching rules.
What it means
A browser cache can keep a previously received HTTP response and reuse it when the HTTP caching rules permit. The response has a freshness lifetime, may need validation with the origin, or may be ineligible for storage. Reuse is conditional; it is not a promise that a browser will store every resource. HTTP caching standard
The browser's HTTP cache is different from a DNS resolver cache (name-to-address answers) and from a CDN edge cache (shared responses near visitors). Refreshing one layer does not automatically clear another.
Try it
Example — a reusable CSS response. This illustrative header sequence is not a captured browser session.
HTTP/1.1 200 OK
Content-Type: text/css
Cache-Control: private, max-age=60
ETag: "revision-4"
/* illustration */During an eligible 60-second freshness window, a private browser cache can reuse this representation without a network request. When it becomes stale, it may send a conditional request:
GET /styles.css HTTP/1.1
Host: www.example.com
If-None-Match: "revision-4"
HTTP/1.1 304 Not Modified
ETag: "revision-4"A valid 304 tells the cache it can update and reuse the stored representation; the 304 response itself does not include the original CSS body. Actual request/response framing and validator choices depend on the client and server. Validation
Understand these response controls
| Directive | Practical interpretation |
|---|---|
max-age=60 | Fresh for up to 60 seconds of calculated response age, subject to other rules |
no-cache | A stored response must be validated before reuse; it does not simply mean never store |
no-store | The cache must not store the response; not a full privacy/security guarantee |
private | A shared cache must not store this response; a private cache may under the rules |
s-maxage=300 | Shared-cache freshness can differ from the browser's own max-age |
The Vary field can require selected request-header values to match before a stored response is reused. Other restrictions apply to methods, response codes, authorization and freshness calculations. Cache directives
Diagnose stale content
- Inspect the exact URL and response headers in browser developer tools. The address may differ by query or a redirect.
- Determine whether the browser reports a network transfer, local cache reuse, validation or service-worker handling. A service worker has its own logic and is not synonymous with HTTP cache.
- Compare the response with the CDN or origin only after identifying which layer served it. A browser reload is not a universal cache purge and not a DNS-change test.
- For files that must remain available to already-open pages across deployments, consider versioned/content-hashed asset URLs together with compatible retention. For sensitive personalized responses, review the entire cache policy and shared intermediaries rather than assuming
privatemeans encrypted.
In practice
Use freshness for stable resources, validators for resources that may change, and a deliberate policy for personalized data. Compare with CDN for shared edge behavior and DNS TTL for an entirely different cache lifetime. If a real page is missing, HTTP 404 troubleshooting helps separate missing routes from stale content.
Sources & model boundaries
Primary references used for this explanation. The example above is illustrative; it is not a live check.
- RFC 9111 — HTTP Caching
Sections 3–5. Caching eligibility, validation, freshness and Cache-Control directives.
Checked .
- RFC 9110 — HTTP Semantics
Sections 6, 8, 9 and 15. HTTP messages, methods, representations and status codes.
Checked .
- Cloudflare — Revalidation
Conditional requests and stale revalidation. CDN revalidation behavior is distinct from browser cache behavior.
Checked .