元标记无缓存会阻止路由器缓存吗? [英] Does meta tag no-cache prevent router caching?

查看:79
本文介绍了元标记无缓存会阻止路由器缓存吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下应该防止浏览器缓存的元标记

I have the following meta tags that supposedly prevents browser caching

<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />

这是否还会阻止缓存服务器保存内容(如果没有)一种防止路由器/服务器缓存的方法?

Does this prevent a caching server from holding the content as well, if it doesn't, is there a way to prevent router/server caching?

推荐答案

来自此处


为什么META缓存控件不总是
工作

Why META Cache Controls Don't Always Work

请注意,示例
中的META标签都使用了HTTP-EQUIV属性,
试图模仿HTTP标头
信息。 HTTP标头控制
浏览器和代理缓存如何处理
您的网页。它们在
HTML中不可见,通常由您的Web服务器自动生成

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标头。引用

You are better off using HTTP headers for setting the cache property. References

http://support.microsoft.com / kb / 234067

http://www.htmlgoodies.com/beyond/reference/article.php/3472881

这篇关于元标记无缓存会阻止路由器缓存吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆