在某些服务器上,last-modified http 标头字段指向 future,为什么?
例如,考虑来自 php.net 的 url,就这样吧: http://pl2 .php.net/manual/en/function.time.php
我获取此信息时的格林威治标准时间为:上午 7:32,我的当地时间为欧洲冬季时间 (CET) 上午 8:32
,标题为:
HTTP/1.1 200 OK
Date: Tue, 08 Nov 2011 07:23:40 GMT
Server: Apache/2.2.21 (FreeBSD) mod_ssl/2.2.21 OpenSSL/0.9.8k DAV/2 PHP/5.3.8 with Suhosin-Patch
X-Powered-By: PHP/5.3.8
Content-language: en
Set-Cookie: LAST_LANG=en; expires=Wed, 07-Nov-2012 07:23:40 GMT; path=/; domain=.php.net
Last-Modified: Tue, 08 Nov 2011 10:03:04 GMT
Vary: Cookie
Link: <http://php.net/time>; rel=shorturl
Transfer-Encoding: chunked
Content-Type: text/html;charset=utf-8
但是 Last-Modified
字段指向未来大约 2.5 小时,为什么?
还有一个 date
字段,它对于文件修改时间似乎是正确的,但是最后修改的时间是什么?
这是使用 php 5.3.8 和 libcurl 下载的。
for example consider an url from php.net, let's be it: http://pl2.php.net/manual/en/function.time.php
gmt time when I fetched this was : 7:32 AM and my local time was 8:32 AM winter european time (CET)
and the header is :
HTTP/1.1 200 OK
Date: Tue, 08 Nov 2011 07:23:40 GMT
Server: Apache/2.2.21 (FreeBSD) mod_ssl/2.2.21 OpenSSL/0.9.8k DAV/2 PHP/5.3.8 with Suhosin-Patch
X-Powered-By: PHP/5.3.8
Content-language: en
Set-Cookie: LAST_LANG=en; expires=Wed, 07-Nov-2012 07:23:40 GMT; path=/; domain=.php.net
Last-Modified: Tue, 08 Nov 2011 10:03:04 GMT
Vary: Cookie
Link: <http://php.net/time>; rel=shorturl
Transfer-Encoding: chunked
Content-Type: text/html;charset=utf-8
but Last-Modified
field points about 2.5 hours in the future, why ?
and there also is date
field which seems to be correct for file modification time, but what is the last-modified then for ?
This was downloaded with php 5.3.8 with libcurl.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不得不说他们的服务器配置不正确。
I have to say their server is improperly configured.
这实际上有助于缓存页面,因为上次修改的时间戳设置为将来的时间,在此之前您每次都会加载缓存的副本。
This actually helps in caching the page, since the last modified time stamp is set to the future you will load a cached copy every time until then.