2013-07-13 98 views
0

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

缓存控制:无缓存

是行不通的。而且这个缓存在击中F5后会破坏我的网站,因为我不确定它缓存了什么,并且存在很多动态操作。

因此,有两个问题:

  • 我如何关闭这个缓存?
  • 如何检查正在缓存的内容?

回答

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" /> 

==>从这个职位:https://stackoverflow.com/a/2068407/2213706

下面是一些关于If-Modified-Since头:

==>https://stackoverflow.com/a/1192640/2213706

+0

不工作时删除缓存。在我的网站上点击F5和ctrl + F5之间仍然存在差异 – user2394156

+0

等等...我认为它有一点帮助,但仍然不完全。我的意思是,现在该网站在Chrome浏览器下正常显示,但例如Firefox仍然存在问题。 – user2394156

+0

如何在Firefox中进入网站时检查缓存中加载的内容? – user2394156

0

在<头>

<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" />

或Ctrl + Shift + R

或Ctrl + F5

或从浏览器

或私密浏览