cross-browser - 哪些浏览器支持 stale-if-error 和 stale-while-revalidate?

标签 cross-browser cache-control

RFC 5861建议Cache-Control扩展stale-while-revalidate :

When present in an HTTP response, the stale-while-revalidate Cache- Control extension indicates that caches MAY serve the response in which it appears after it becomes stale, up to the indicated number of seconds.

stale-if-error :

The stale-if-error Cache-Control extension indicates that when an error is encountered, a cached stale response MAY be used to satisfy the request, regardless of other freshness information.

当无法重新验证响应时,允许过时的内容使用更长时间。

这些是supported by CDNs ,包括FastlyKeyCDN .

stale-while-revalidate 也是 mentioned in the Fetch standard (stale-if-error 不是)。

浏览器的支持状况如何?

最佳答案

截至2019年5月,根据Mozilla的兼容性表和 Chromestale-while-revalidate 是:

这些将是 2019-07-09 上这些浏览器的主要版本和 2019-06-09分别。

stale-if-error 似乎没有当前或计划的支持。

(有关为什么在浏览器中实现此功能的更多详细信息,请参阅 RFC 作者的博客 Chrome and Stale-While-Revalidate。)

关于cross-browser - 哪些浏览器支持 stale-if-error 和 stale-while-revalidate?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56196238/

相关文章:

javascript - 测试页面是否有水平滚动条(电脑和移动设备)

cross-browser - 默认情况下,IE7 是否支持任何 CSS 3 属性?

actionscript-3 - ActionScript/AIR - 在运行时确定设备配置文件?

caching - CloudFlare 不考虑缓存控制 header

css - 水平列表,高度灵活

jquery - 简单的 jQuery 在 Chrome 上运行,而不在 Firefox 和其他浏览器上运行

css - IE渲染问题

javascript - 如何使用 Service Worker 或缓存对象通过 JavaScript 设置缓存过期时间

azure - 设置 Azure 存储容器的默认缓存 header

WPF刷新图片(缓存问题)