我有以下元标记,据说可以防止浏览器缓存
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
这是否会阻止缓存服务器保存内容,如果不能,是否有办法阻止路由器/服务器缓存?
最佳答案
来自here
Why META Cache Controls Don't Always Work
Note that the META tags in our example both used the HTTP-EQUIV attribute, which tries to mimic HTTP header information. HTTP headers control how both browser and proxy caches handle your Web pages. They are invisible in HTML and usually generated automatically by your Web server.
您最好使用 HTTP header 来设置缓存属性。引用文献
http://support.microsoft.com/kb/234067
http://www.htmlgoodies.com/beyond/reference/article.php/3472881
关于caching - 元标记无缓存是否会阻止路由器缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2200957/