Blog post with background information at https://www.mnot.net/blog/2014/06/01/chrome_and_stale-while-revalidate.
I noticed that the Google Font API uses this header. (e.g. https://fonts.googleapis.com/css?family=Open+Sans:400,300,700 on https://performance.wikimedia.org/)
cache-control: private, max-age=86400, stale-while-revalidate=604800
As of writing, no browsers have implemented this yet (Chrome was experimenting, but no milestone yet. Firefox has a tracking bug but no signals yet.) But, various web proxies and CDNs do support stale-while-revalidate.
This would give us an immediate improvement in cache-miss latency for ResourceLoader. And, once browsers implement it, it would also take away the latency of common requests throughout a session such as the startup module - which is referenced in all pages, but expires every 5 minutes.
ResourceLoader design doc: https://www.mediawiki.org/wiki/ResourceLoader/Features#Startup_Module
Browsers:
- Chrome platform status: https://www.chromestatus.com/feature/5050913014153216
- Chrome launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=348877
- Firefox launch bug: https://bugzilla.mozilla.org/show_bug.cgi?id=995651
Proxies:
- Fastly CDN https://www.fastly.com/blog/stale-while-revalidate-stale-if-error-available-today
- Varnish 4.1.0 (https://github.com/varnishcache/varnish-cache/commit/bab12263b1) - as default value of obj.grace.
- Squid 2.7
- Nginx 1.11.10 https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_use_stale, https://github.com/nginx/nginx/commit/da2b2cf1e0, https://www.nginx.com/blog/mitigating-thundering-herd-problem-pbs-nginx/

