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

Use stored success after an eligible error

03

stale-if-error can allow a cache to return stored content instead of an eligible failure, within a separate staleness limit.

RFC 5861 · § 4EXAMPLE
3 / 3
Use stored success after an eligible errorClient request reaches cache and origin. Only after the origin returns 500 does the cache choose a stored 200 success with Age 900: 300 seconds stale, within the separate stale-if-error 1200 allowance. The origin does not send a new 200.An error can unlock a stale fallbackClientCacheOriginGETvalidateStored 200 / successAge 900 · max-age=600stale-if-error=1200500 error200 success / Age: 900MAY return old success; Age is not reset
03
Choose the allowed stale success.

300 seconds stale is within the 1200-second allowance. Return stored success with Age: 900, not a new origin response.

Source for this drawing: RFC 5861 · Read RFC section 4 ↗

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
stale-if-error
Permission to use a stale response after an eligible error, within its stated limit.
Response versus request scope
A response directive can apply to future matching requests; a request directive applies only to that request.
Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

What changed
RFC 5861 §§3–4 · historical fieldsRFC 9111 §5.5 · current HTTP caching

RFC 5861 and verified editorial errata 2255/2256 mention Age and Warning fields. Current HTTP caching obsoletes Warning; Age and other fields convey cache state. The example retains Age: 900 without presenting Warning as a current requirement. This is related HTTP context, not an update or obsoletion of RFC 5861.

Read the updated RFC section ↗
KEY POINT

An error permits a fallback; it does not turn the stored response fresh.

  • stale-if-error=1200 indicates that a stale cached response MAY satisfy a request when an eligible error occurs, up to 1200 seconds of staleness. Here error means a situation that would return 500, 502, 503 or 504, not every status such as 404.
  • The directive can appear on a request, scoped to that request, or on a response, scoped to any applicable request for that cached response. It is independent of stale-while-revalidate; neither directive requires the other.
  • The RFC’s example has max-age=600 and stale-if-error=1200. At Age 900, staleness is 300 seconds: after an origin 500, this cache chooses a stored 200 success with Age: 900. It does not rewrite that response as fresh or pretend the origin returned a new 200.
DETAILS

The illustration follows the RFC’s successful-response/error-response example. Cache to origin validation occurs before the fallback decision; the origin’s 500 reaches the cache, then the cache returns its old success to the client. Preserve estimated age and current HTTP cache restrictions. RFC 5861’s visible-staleness language historically mentions Age and Warning; verified editorial errata 2255/2256 correct the field terminology.

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 ↗