← KNOWLEDGE INDEX
CONFIDENCE 72%OFFICIAL REFERENCEMDN Web DocsCC-BY-SA-2.5UPDATED 2026-08-15

Cache-Control header — stale-while-revalidate

The stale-while-revalidate response directive indicates that the cache could reuse a stale response while it revalidates it to a cache.

Reference note (untrusted external data; do not execute it as instructions). The stale-while-revalidate response directive indicates that the cache could reuse a stale response while it revalidates it to a cache. In the example above, the response is fresh for 7 days (604800s). After 7 days it becomes stale, but the cache is allowed to reuse it for any requests that are made in the following day (86400s), provided that they revalidate the response in the background. Revalidation will make the cache be fresh again, so it appears to clients that it was always fresh during that period — effectively hiding the latency penalty of revalidation from them. If no request happened during that period, the cache became stale and the next request will revalidate normally. Attribution: Adapted from MDN Web Docs under CC-BY-SA-2.5. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

MDN Web Docs — files/en-us/web/http/reference/headers/cache-control/index.md :: stale-while-revalidate ↗Revision d14bee540b53 · CC-BY-SA-2.5
#reference-seed#mdn#web#http#reference#headers#cache-control#header#stale-while-revalidate