简体   繁体   English

HTTP缓存控制标头

[英]HTTP Cache-Control Header

When I test my site using http://www.webpagetest.org/ . 当我使用http://www.webpagetest.org/测试我的网站时。 It says that I have not set cache expiration header on the home page. 它说我尚未在主页上设置缓存过期标头。 When I curl, I see it is set: 当我卷曲时,我看到它已设置:

HTTP/1.1 200 OK
Date: Wed, 23 Mar 2016 22:31:17 GMT
Server: Apache/2.2.22 (Ubuntu)
Cache-Control: max-age=691200, public
Strict-Transport-Security: max-age=31536000
X-XSS-Protection: 1; mode=block
X-Request-Id: aa9fc904-2af6-4649-bbb2-dfc308172c08
ETag: W/"0011b34ba2dd655ce7380a1014310370"
X-Frame-Options: SAMEORIGIN
X-Runtime: 0.010013
X-Content-Type-Options: nosniff
X-Powered-By: Phusion Passenger 5.0.25
Set-Cookie: request_method=HEAD; path=/; secure
Set-Cookie: _lafon_session=V21Yc1RlSUlRPT0%3Ddaea; path=/; secure; HttpOnly
Status: 200 OK
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8

Any ideas on why webpagetest.org thinks the header is not set? 关于webpagetest.org为什么认为标头未设置的任何想法?

http://www.webpagetest.org/ wrongly expects Expires header to be set, forgetting about full analog with higher priority - max-age. http://www.webpagetest.org/错误地期望设置Expires标头,而忽略了具有更高优先级的完整模拟-max-age。 Everything is ok with your site. 您的网站一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM