topic
Verified 2026-09-18

Cache-Control: max-age

Sets how long a response is considered fresh, in seconds.

max-age=0 forces revalidation everywhere. Pair it with immutable for fingerprinted static assets that never change.

httpcacheheaderdirective

Reference (http)

Cache-Control: max-age=31536000, immutable

max-age=0 forces revalidation everywhere. Pair it with immutable for fingerprinted static assets that never change.

Common mistakes

  • Treating max-age as a guarantee; caches may still evict early or serve stale under stale-if-error.
Permalink: https://merginit.com/reference/http/directive-max-age