proxy-revalidate
Like must-revalidate, but only applies to shared caches (CDNs). Browser caches can still serve stale content if the origin is unreachable. Useful when you trust end-users seeing slightly stale content but need CDN freshness guarantees.
Full Explanation
proxy-revalidate works exactly like must-revalidate, but it only applies to shared caches (CDNs, reverse proxies). Browser caches are free to serve stale content when the origin is unreachable. This gives you strict freshness at the CDN layer while being lenient with end-user browsers.
The use case is content where CDN consistency matters (you want every edge node serving the same version) but where a user seeing a slightly stale page from their browser cache is not a big deal. Think of a news article: you want CDN edges to always have the latest corrections, but if someone's browser serves a version from 5 minutes ago while offline, that is fine.
Cache-Control: public, max-age=300, s-maxage=600, proxy-revalidate
This directive is less commonly used than must-revalidate because most teams either want strict freshness everywhere or are comfortable with staleness everywhere. But when you need that middle ground, proxy-revalidate is the right tool.
Examples
For a news or editorial site where CDN freshness matters but browser staleness is tolerable:
Cache-Control: public, max-age=120, s-maxage=600, proxy-revalidate
CDNs cache for 10 minutes and must revalidate when stale. Browsers cache for 2 minutes and can serve stale content if the network is down. This keeps CDN content accurate while giving end users a more resilient experience.
Frequently Asked Questions
Like must-revalidate, but only applies to shared caches (CDNs). Browser caches can still serve stale content if the origin is unreachable. Useful when you trust end-users seeing slightly stale content but need CDN freshness guarantees.
For a news or editorial site where CDN freshness matters but browser staleness is tolerable:
Cache-Control: public, max-age=120, s-maxage=600, proxy-revalidate
CDNs cache for 10 minutes and must revalidate when stale. Browsers cache for 2 minutes and can serve stale content if the network is down. This keeps CDN content accurate while giving end users a more resilient experience.
Related CDN concepts include:
- must-revalidate — Once content becomes stale, the cache must revalidate with the origin before serving it. The …