Cache-Control
Request and response header, caching
Tells browsers and shared caches whether and how long a response may be stored.
Cache-Control: public, max-age=31536000, immutable
max-age sets the lifetime in seconds for all caches, s-maxage overrides it for shared caches like CDNs. no-cache allows storing but forces revalidation before each use; no-store forbids storing at all. private restricts caching to the browser.
Files with a content hash in their name (app.3f9a1c.js) can be cached for a year with immutable. HTML usually gets a short lifetime or no-cache so updates appear immediately.
Check it on a live site
Run a header check on any URL to see whether and how it sends Cache-Control.
Specification: RFC 9111 §5.2