http-equiv Cache-Control 和 Pragma 指令是否有 HTML5 兼容的替代方案?

Are there HTML5 compliant alteratives to the http-equiv Cache-Control and Pragma directives?

我正在更新网站的 HTML 以使其符合 HMTL5。 现有站点具有以下两个元 http-equiv 元素:

这两个 HTML5 合规吗?如果不是,我应该用什么替换它们以使我的网站 HTML5 兼容?

我发现这个 link 列出了有效的 http-equiv pragmas:

http://www.w3.org/TR/html5/document-metadata.html#attr-meta-http-equiv

列表中不包含 Cache-Control 或 Pragma。

提前致谢。

缓存相关编译指示不合规:

Pragma directives corresponding to headers that affect the HTTP processing model (e.g. caching) must not be registered, as they would result in HTTP-level behaviour being different for user agents that implement HTML than for user agents that do not.

HTML5没有选择。

以下是 HTML5 的相关 http-equiv 编译指示:

The http-equiv attribute is an enumerated attribute. The following table lists the keywords defined for this attribute. The states given in the first cell of the rows with keywords give the states to which those keywords map. Some of the keywords are non-conforming, as noted in the last column.

State                       Keyword                 Notes

Content Language            content-language        Non-conforming
Encoding declaration        content-type    
Default style               default-style   
Refresh                     refresh     
Cookie setter               set-cookie              Non-conforming
X-UA-Compatible             x-ua-compatible     
Content security policy     Content-Security-Policy     

参考资料