max-age = 0,必须使用原始服务器或CDN重新估计重新估计?
许多网站的HTML文件使用CACH-CONTROL:public,max-age = 0,必须revalidate
,例如这个。 根据此mdn page < /a>,这与缓存控制相同:对于大多数现代浏览器。我了解它是如何从高级服务中起作用的。
对于具有此缓存策略的页面,要进行返回访问或刷新,浏览器将发送有条件的请求以重新验证缓存资产,即HTML文件。我的问题是,此请求是否始终绕过任何中间缓存,例如CDN中的边缘服务器,然后直接转到原始服务器(没有s-Max-age
明确设置)或任何中间缓存可以代表Origin服务器验证缓存?
MDN页面没有明确给我答案。我的猜测是,它仍将转到CDN进行重新验证,因为一旦出现新构建以使其获得新的副本,Origin Server可以主动清除CDN。
many websites' html file uses cache-control: public, max-age=0, must-revalidate
, like this one.
According to this MDN page, this is the same as Cache-Control: no-cache
for most modern browsers. And I understand how it works from a high-level.
For a page with this cache strategy, for a return visit or a refresh, the browser would send a conditional request to revalidate the cached asset, i.e. the HTML file. My question is, does this request always bypass any intermediate cache, e.g. an edge server in a CDN and go straight to the origin server (with no s-max-age
set explicitly) or any intermediate cache can validate the cache on behalf of the origin server?
The MDN page doesn't explicitly give me the answer. My guess is that it would still go to CDN for revalidation as the origin server can proactively purge the CDN once a new build occurs to give it a fresh copy.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论