Visual RFC.
ALL RFCs / RFC 5861
Read the RFC ↗
RFC 5861 / STALE CACHE CONTROLS

Separate freshness from the stale window

01

An extra stale-while-revalidate window permits limited reuse after normal freshness ends; it does not make old content fresh.

RFC 5861 · § 3EXAMPLE
3 / 3
Separate freshness from the stale windowSchematic example with max-age 600 and stale-while-revalidate 30. Age 550 is fresh; Age 610 is ten seconds stale within the extra allowance; Age 631 is beyond it and requires normal handling when no other permission applies.Freshness and stale permission differmax-age=600stale-while-revalidate=30freshstale allowance0600630>630Age 631Age increasesWindow ended: handle normallyNo other stale permission assumed600s fresh + 30s stale · schematic, not to scale
03
Return to normal request handling.

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 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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.

KEY POINT

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.
DETAILS

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 ↗

All chapters in RFC 5861

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗