gpt4 book ai didi

http-headers - 缓存控制最大年龄元标记未注册

转载 作者:行者123 更新时间:2023-12-04 07:53:48 25 4
gpt4 key购买 nike

我把它放在我的头部部分。它出现在浏览器的页面源代码中。

<meta http-equiv="Cache-Control" content="max-age=1209600">

但是,当我查看 Chrome 扩展程序 Live HTTP Headers 时,它说如下。
Cache-Control: max-age=0
Content-Encoding: gzip
Content-Length: 5849
Content-Type: text/html; charset=utf-8
Date: Sat, 05 Apr 2014 04:29:16 GMT
Expires: Sat, 05 Apr 2014 04:29:16 GMT
Last-Modified: Sat, 05 Apr 2014 03:33:19 GMT
max-age不注册。我已经清空了浏览器缓存,但没有任何区别。

有什么解释吗? This是网站,顺便说一句。

更新:

Firebug 类似记录 Cache-Control: max-age=0 .

谷歌也明确 here那个 max-age覆盖 Expires header (我没有设置)并且您不需要两者。

最佳答案

当您使用 Live HTTP Headers 等工具时,它们会向您显示浏览器发送的实际 HTTP header 。他们如何处理 meta用于模拟 HTTP header 的标签是一个不同的问题。我们可以期望解决任何冲突以支持实际标题。 (这已在 Content-Type header 的 HTML 规范中规范地指定。)

要控制缓存,您应该(至少主要是)使用服务器配置。见 Caching Tutorial for Web Authors and Webmasters .

关于http-headers - 缓存控制最大年龄元标记未注册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22876645/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com