在某些服务器上,last-modified http 标头字段指向 future,为什么?

发布于 2024-12-14 06:16:48 字数 876 浏览 5 评论 0原文

例如,考虑来自 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黄昏下泛黄的笔记 2024-12-21 06:16:48

我不得不说他们的服务器配置不正确。

I have to say their server is improperly configured.

阳光①夏 2024-12-21 06:16:48

这实际上有助于缓存页面,因为上次修改的时间戳设置为将来的时间,在此之前您每次都会加载缓存的副本。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文