Choose your depth. Learn at your own pace.
Understand it
A browser can keep a response so it does not download the same bytes repeatedly. When that copy needs checking, the browser can ask the server whether it still matches. Think of asking whether the library’s revised edition differs from your copy.
In the example, an unchanged page gets a short 304 response and the browser reuses its stored body. A changed page gets a new response body. Cache rules determine when this check is needed.
Under the hood
An ETag is a validator. A conditional GET using If-None-Match can receive 304 Not Modified if the selected representation still matches. Cache-Control defines reuse requirements; no-cache permits storage but requires validation before reuse, whereas no-store directs caches not to store the response.
Practitioner perspective
Review cache keys, authorization boundaries and relevant Vary fields. Validators must correspond to the selected representation. Never assume a 304 makes user-specific content suitable for a shared cache; privacy and correctness require their own policy.
Watch it work
A fictional, simplified model. Select a component to inspect it, or follow the steps in order.
Keep the saved page, or fetch a new one?
Example: a browser has yesterday’s timetable. A validator helps the server compare versions.
The browser validates its stored response and reuses the saved body.
How to use this example
Select Next step to read at your own pace, or Animate step to watch one exchange. Nothing advances until you choose.
What it means
Everyday example
State in this scenario
Inspect components & read every step
- Browser
The program you use to open websites.
Example: Your browser requests a web page and displays the response.
- Web server
Software that responds to requests for web content.
Example: It sends a page or confirms that a saved representation remains unchanged.
- Saved response
A previously stored web response that may be reused if caching rules allow it.
Example: The browser checks whether yesterday’s timetable is still current.
Page unchanged
The browser validates its stored response and reuses the saved body.
- Saved response Browser: Saved validator. The browser has a stored response with an ETag.
- Browser Web server: If-None-Match. A conditional GET asks whether this representation still matches.
- Web server Browser: 304 Not Modified. The server confirms a match without sending the full body.
Page changed
A different representation means the browser needs the new response body.
- Saved response Browser: Old validator. The browser has an earlier timetable response.
- Browser Web server: If-None-Match. The server compares the saved validator with the current version.
- Web server Browser: 200 + new body. The server sends the changed representation and relevant metadata.
Fictional teaching trace. One moving dot represents an exchange, not a measured network capture.
Open the detailed lesson walkthrough
Explore the system
Stored copy
The browser keeps a response and its validator.
Read every step without animation
Unchanged page
- Stored copy. The browser keeps a response and its validator.
- Ask server. It requests the page conditionally.
- 304 response. It reuses the saved body after successful validation.
Validation can avoid downloading the body again.
Changed page
- Old copy. The browser has a previous representation.
- New version. The server finds that the validator no longer matches.
- 200 response. The server sends the new representation.
A changed representation needs fresh bytes.
Attack view
A shared cache reuses a personalized response across users because its key or policy omitted identity boundaries.
Defender view
- Set cache directives deliberately for sensitive and personalized responses.
- Test changed and unchanged representations, including different users and variants.
Common mistakes
- 304 is not a full page download.
- no-cache and no-store have different meanings.
Check your understanding
Active recall: explain this idea in 30 seconds
A browser can keep a response so it does not download the same bytes repeatedly. When that copy needs checking, the browser can ask the server whether it still matches. Think of asking whether the library’s revised edition differs from your copy.
Now give an example and name one limitation. Revisit the explanation if you get stuck.
Primary sources
Original explanations informed by these specifications and official resources. Source versions and lesson review are separate from product updates.
Content reviewed 2026-09-10. Read the editorial policy.