Skip to content

FlashcardNot attempted

Cache-Control vocabulary

Recall it before you reveal

What do max-age, immutable, no-cache, no-store, must-revalidate, public, private and s-maxage mean?

Space to reveal
Show answer & explanation
  • max-age=N: fresh for N seconds; until then it may be used without asking the server.
  • immutable: won't change while fresh, so supporting browsers skip revalidation even on a user reload.
  • no-cache: may be stored, but must be revalidated with the server before every use. (It does not mean "don't cache".)
  • no-store: don't keep a copy anywhere.
  • must-revalidate: once stale, it must not be used without a successful revalidation. max-age=0, must-revalidate behaves much like no-cache.
  • public: shared caches (CDNs, proxies) may store it. private: only the user's browser may.
  • s-maxage=N: freshness for shared caches only; overrides max-age there.

Typical setup: hashed assets public, max-age=31536000, immutable; HTML no-cache; personal API data no-store or private.