topic
Verified 2026-09-18

Cache-Control: stale-if-error

Lets caches serve stale content when the origin returns an error.

Stale-if-error improves resilience during origin outages for the given number of seconds after expiry, but it also masks short outages from monitoring.

httpcacheheaderdirectivereliability

Reference (http)

Cache-Control: max-age=300, stale-if-error=86400

Stale-if-error improves resilience during origin outages for the given number of seconds after expiry, but it also masks short outages from monitoring.

Common mistakes

  • Combining long stale-if-error windows with content that must reflect origin failures quickly.
Permalink: https://merginit.com/reference/http/directive-stale-if-error