防止浏览器中的任何缓存

Prevent any caching in the browser

我可以使用哪些 header(s) 来防止浏览器方面的任何缓存?

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

会不会只是:

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

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

  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否则会怎样?

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

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