Estimated reading time : 7 min · Published
Classify responses before choosing a lifetime
Inventory public pages, static assets, API responses, accounts and confirmations. Record whether each changes with the user, language or a parameter. Identify browser, intermediary and CDN caches. An account page should not inherit the policy of a public photograph merely because that policy is easy to apply.
Distinguish freshness from permission to store a response. MDN explains that no-cache requires revalidation, whereas no-store requests no storage. private restricts storage to private caches. A cookie alone does not automatically make a response private.
Plan how an update becomes visible
Write an update rule for each family. For a versioned file, confirm that the new page requests the new URL. For a public page with a stable address, describe revalidation or purging. A long lifetime without a replacement procedure only moves the problem to the next content change.
Choose a practical example: a price correction, opening hours or a replaced document. Record when the origin changes, then inspect a session that has already visited the page. A fresh browser alone does not cover a returning visitor retaining an earlier response.
During revalidation, the browser can send the ETag of its stored copy in If-None-Match. If the representation still matches, a 304 response allows reuse of the stored body; it does not deliver a new page body. If the representation has changed, a complete 200 response can deliver the content and its new validator. An isolated status code therefore does not describe what the visitor ultimately sees.
If the first response includes Last-Modified, copy that date exactly into If-Modified-Since in a second GET to the same URL. A 304 means the server’s modification date is no later than the date supplied. If two versions are served within the same second, the dates can match even though the content changed. Use an ETag that distinguishes the versions when that precision matters. If the request includes both conditional fields, If-None-Match takes precedence.
The table uses fictitious validators demo-v1 and demo-v2 to distinguish stages, without measuring this site. Keep the conditional request, response, reused copy and displayed correction together. An ETag is an opaque server-generated identifier, not necessarily a hash or date. Also check Back navigation: history may restore a snapshot through a mechanism separate from the HTTP cache.
Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.
| Test situation | Exchange to connect | Useful evidence |
|---|---|---|
| First read | 200 with a body and ETag demo-v1. | The initial copy contains the expected version. |
| Revalidation without a change | If-None-Match demo-v1, then 304. | The stored body is reused; no new body is received. |
| Changed representation | If-None-Match demo-v1, then 200 with demo-v2. | The new body is received and the correction is actually visible. |
| A 304 response observed alone | The response must be connected to the stored copy. | The code alone proves neither content recovery nor display of the correct variant. |
- MDN : HTTP caching and revalidation
Consulted on 22 October 2026; ETag, conditional requests, 304 responses and history navigation.
- IETF RFC 9111 : Cache validation
Consulted on 22 October 2026; handling validation responses and updating stored responses.
- RFC 9110 § 13.1.3 · If-Modified-Since
Modification dates, one-second resolution and ETag precedence. Accessed 15 November 2026.
Test different identities and states
On a test environment, compare an anonymous visit, two distinct accounts, logout and back navigation. Inspect the displayed content and received headers rather than only the hosting configuration. Use synthetic test records instead of real personal documents.
Include relevant language, device, filter and error states. Keep the URL, session state, expected response and result for each test. When personalisation passes through a shared cache, have the infrastructure owner review cache keys and exclusions.
Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.
| Situation or setting | What it means | Useful check |
|---|---|---|
| no-cache | Storage remains possible, but the response must be validated before reuse. | Check revalidation after an update; do not treat this directive as no-store. |
| no-store | Instructs caches not to store the response. | Also check existing cache layers and the policy for sensitive pages. |
| private | Prohibits shared-cache storage while allowing a private cache. | Test with two separate accounts, then anonymously. |
Keep a recovery procedure
Document who can purge the cache, verify its effect and restore a previous configuration. A broad purge may temporarily reduce caching benefits, so prepare a check of essential pages after the operation.
Review the policy when customer accounts, commerce, a language or a CDN is introduced. A useful deliverable is a response–policy–test–owner matrix. A performance score alone establishes neither freshness nor isolation between users.
Primary documentation : MDN : HTTP caching.
Prevent a shared cache from delivering the wrong representation.
Synthetic case: one URL serves two formats according to a request header. Test both behind the actual cache and check the variation key, including Vary when relevant. Separate URLs may better suit editorial editions. Automatic negotiation must not make an explicitly selected version inaccessible.
- Each request receives its intended representation, including after the other version with caching enabled.
- MDN Content Negotiation
Guide to selecting an HTTP representation according to client capabilities or preferences, including language, format and encoding.
Separate public and private responses

Proposed case: a personalised confirmation is tested behind the same cache as public pages. Examine its content and headers in that exact journey.
Compare request, response and reuse conditions with two isolated test sessions. Keep observed headers and content separation; a global cache rule does not validate every response.
- Classify the response
- Observe actual headers
- Test separate sessions
- Check reading without a remote font
Choose and test web fonts across languages
Reference documents
- MDN Content Negotiation · Source consulted
- MDN : HTTP caching · Source consulted
Content updated on
Documented reference points for this topic
| Reference | Value or syntax | Scope |
|---|---|---|
| HTTP · 304 | If-None-Match → 304 | For a GET or HEAD request, an unchanged representation can be reused without resending its body. |
| MDN · Vary | Vary: Accept-Language | When one URL produces different responses according to Accept-Language, Vary identifies that cache selection criterion. Keep the value consistent on 200 and 304 responses. Separate language URLs do not require this header merely because the website is multilingual. |
| HTTP · If-Match | If-Match: "r7" → 412 | If-Match compares a strong validator before a write. Under the illustrated contract, a stale version receives 412; keep the draft to compare changes. |
Dates indicate when references were consulted. These facts are neither a site audit nor an overall compliance statement.
