Stale-while-revalidate is a Cache-Control extension, defined in RFC 5861, that lets a cache serve a stale response immediately while it revalidates the fresh copy in the background.
Stale-while-revalidate (often abbreviated SWR) is an HTTP cache directive. It tells an intermediate cache (a CDN edge, a reverse proxy, a browser cache) that after a resource's freshness expires, it may still serve the old copy for a bounded additional window, and revalidate the fresh copy asynchronously. The client gets a response immediately — fast, always — and the cache updates its stored copy from the origin for the next request. The next visitor sees the refreshed content, and the visitor after that, and so on, until the origin changes.
This is a different contract from the default. Standard HTTP caching says "if fresh, serve it; if stale, revalidate synchronously (blocking) or return an error". SWR says "if fresh, serve it; if stale but within the SWR window, serve stale now and revalidate in the background". The client never waits for revalidation. The origin sees at most one revalidation per cache entry per window, not one per request. It is a small, specific extension with a large effect on perceived latency.