html5元标记缓存控制不再有效? [英] html5 meta tag cache-control no longer valid?

查看:152
本文介绍了html5元标记缓存控制不再有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何定义

 < meta http-equiv =cache-controlcontent =no-cache /> HTML5中的

?根据W3C验证器和文档,它不再有效。将缓存指令放入元标记并不是一个好主意,因为尽管浏览器可能会读取它们,但代理惯于。出于这个原因,它们是无效的,你应该发送缓存指令作为真正的HTTP头。


How do I define

<meta http-equiv="cache-control" content="no-cache" />

in HTML5? It is no longer valid according to the W3C Validator and the documentation.

解决方案

Putting caching instructions into meta tags is not a good idea, because although browsers may read them, proxies won't. For that reason, they are invalid and you should send caching instructions as real HTTP headers.

这篇关于html5元标记缓存控制不再有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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