# Stale while revalidate (SWR) `stale-while-revalidate` (SWR) is an HTTP response directive which indicates that the cache could reuse a stale response while it revalidates it to a cache. Example: `Cache-Control: max-age=604800, stale-while-revalidate=86400` In the above example, the response is fresh for 7 days (`max-age`). After 7 days it becomes stale, but the cache is allowed to reuse it for any requests that are made in the following day (`revalidate`). SWR is used by frameworks such as [[Remix]] to cache responses and improve speed. > `stale-while-revalidate` helps developers balance between immediacy—_loading cached content right away_—and freshness—_ensuring updates to the cached content are used in the future_. — Jeff Posnick (https://web.dev/stale-while-revalidate/)