如何关闭缓存?

时间:2013-07-13 09:12:06

标签: http caching browser

如何关闭特定网站的浏览器缓存,因此使用F5刷新它就像用ctrl + F5刷新它一样?我注意到了这个设置:

缓存控制:无缓存

只是不起作用。这个缓存在击中F5之后破坏了我的网站,因为我不确定它的缓存方式以及那里有很多动态的操作。

所以有两个问题:

  • 如何关闭此缓存?
  • 如何查看正在缓存的内容?

2 个答案:

答案 0 :(得分:0)

有任何研究工作......以下是使用HTML获得完美无缓存内容的答案:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />

==&GT;来自这篇文章:https://stackoverflow.com/a/2068407/2213706

以下是关于If-Modified-Since标题的内容:

==&GT; https://stackoverflow.com/a/1192640/2213706

答案 1 :(得分:0)

&lt;头&GT;

&#13;
&#13;
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
&#13;
&#13;
&#13;

或Ctrl + shift + R

或Ctrl + F5

或从浏览器中删除缓存

或私人浏览