topic
Verified 2026-09-18

Cache-Control: stale-while-revalidate

Lets caches serve a stale response while revalidating it asynchronously.

The window is a grace period in seconds after expiry. It trades freshness for latency; do not combine it with content that must be authoritative.

httpcacheheaderdirectiveperformance

Reference (http)

Cache-Control: max-age=60, stale-while-revalidate=30

The window is a grace period in seconds after expiry. It trades freshness for latency; do not combine it with content that must be authoritative.

Common mistakes

  • Using it for authorization-relevant content where a stale response would grant outdated access.
Permalink: https://merginit.com/reference/http/directive-stale-while-revalidate