Wulan’s shelf of kept replies: Cache-Control and the ETag decide whether a reply comes from the shelf with no trip, is checked with If-None-Match (304), or…
Why it matters
A wrong cache label makes a site slow (nothing cached) or shows users an old version (cached too long). Knowing max-age, no-cache, no-store and the ETag’s part means fast assets that never go stale: the base of web performance.
The key idea
max-age decides how long a copy counts as fresh
Common mistakes
no-cache taken for "do not cache" It may be kept, but must be checked every time it is used. "Do not keep" is no-store. The name misleads.
Too long a max-age on HTML Users see the old version until the copy goes stale. HTML is usually no-cache; a long life is only for hash-named assets.
Forgetting a validator (ETag) Without an ETag/Last-Modified, every stale copy downloads whole again. With an ETag, a 304 saves a lot.
Try it in this playground
Get it from the shelf with no trip An age under max-age: Mr. Wiryo does not ride at all.
Get a 304 Not Modified Stale with an ETag: a small letter goes back and forth, the body is not sent again.
Turn the ETag off when stale Without a validator, stale means a full download again (200).
Ask with no-cache, then with no-store no-cache: keep it but ask every time (a quick 304). no-store: not kept, always a full download.