Separate freshness from the stale window
01An extra stale-while-revalidate window permits limited reuse after normal freshness ends; it does not make old content fresh.
31 seconds stale exceeds this allowance; no validation succeeded and no other permission is assumed.
Source for this drawing: RFC 5861 · Read RFC section 3 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
- Cache
- A browser or intermediary that stores reusable HTTP responses.
- Fresh / stale
- Fresh means within the response’s freshness lifetime; stale means it is no longer fresh.
- Age
- An estimate of a stored response’s age in seconds; compare it with its freshness lifetime.
- delta-seconds
- A nonnegative number of seconds used for a directive’s time allowance.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Count the extra allowance from expiry, not from storage.
- stale-while-revalidate is a response Cache-Control extension with a delta-seconds value. Caches MAY serve the response stale for up to that many seconds after it becomes stale; reuse is permission, not an obligation.
- For max-age=600, stale-while-revalidate=30, the example is fresh for 600 seconds, followed by up to 30 additional seconds of permitted stale reuse while asynchronous validation is attempted.
- If the window passes without revalidation, the response SHOULD NOT continue to be served stale absent other information. With no other permission, the next request blocks and is handled normally; expiry does not itself delete the stored response.
Fictional cached /forecast response with the RFC’s 600+30 example: Age 550 is fresh, Age 610 is stale within the allowance, and Age 631 is outside it. Age is the estimated time since response generation or successful validation, not simply time in this cache. The timeline is schematic, not to scale. Examples assume reusable matching responses and no prohibiting directive or overriding extension; current policy is in RFC 9111 §§4.2.4,5.2.3.
Read the RFC section ↗