Skip to content
Commitwise
Menu

Cache-Control

The HTTP header that tells browsers, apps and CDNs whether a response may be stored and how long it stays fresh.

Definition

max-age=N lets a cache reuse the response for N seconds without asking; no-cache allows storing but requires revalidation before every use; no-store forbids storing; private keeps it out of shared caches like CDNs; s-maxage sets a separate lifetime for shared caches; immutable says the content will never change. Without the header, caches may guess a lifetime from Last-Modified.

In practice

Cache-Control: public, max-age=31536000, immutable for /assets/app.8d2f1c.js; Cache-Control: no-store for a bank statement.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.