防止浏览器中的任何缓存



我可以使用哪个标头来防止浏览器部分的任何缓存?

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

会不会只是:

res.setHeader('cache-control','no-cache');

缓存控制:无存储就足够了。

看: https://www.mnot.net/blog/2017/03/16/browser-caching

看起来这是最全面的事情:

res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate');

根据: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

但我想有一件事我不明白 - 似乎must-revalidate是多余的 - 我认为no-cache/no-store已经照顾好must-revalidate否则会做什么?

最新更新