为什么默认缓存过期标头是 Thu, 01 Dec 1994 16:00:00 GMT?这个日期有什么重要意义呢?
当通过 WebSphere 应用程序服务器处理某些请求时,它会设置一个缓存过期标头,时间为 Thu, 01 Dec 1994 16:00:00 GMT。该日期似乎在很多文档中作为过期标头的正确形成日期的示例,但在实际响应方面,它也遍布互联网。这个确切的日期(Thu, 01 Dec 1994 16:00:00 GMT)源自哪里?
当您执行 response.setHeader("Expires",0)
时会发生这种情况吗?这是默认值吗?
When some requests are processed via WebSphere application server, it sets a cache expires header of Thu, 01 Dec 1994 16:00:00 GMT. This date seems to be in a lot of documentation as a example of a properly formed date for an expires header, but it is also all over the internet in regards to actual responses. Where does this exact date (Thu, 01 Dec 1994 16:00:00 GMT) originate from?
Is this what happens when you do response.setHeader("Expires",0)
is this the default value?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为除了 RFC 中的“到期”日期示例之外,没有任何特殊意义1945 年:超文本传输协议 - HTTP/1.0,日期为 1996 年 5 月。至少有一些文本写得更早,实际上是 RFC 1738:统一资源定位器 (URL ) 的日期为 1994 年 12 月。
在撰写本文时,它是一个合理的示例值。同样,RFC“Tue, 15 Nov 1994 08:12:31 GMT”中的“date”标头示例在网络中很流行。这两个值一起构成一个一致的示例。
在 RFC 1945 中没有提到特定的默认值,但它指出
服务器的实现者将阅读 RFC——他们需要阅读 RFC 才能知道要实现什么——并选择给出的示例日期并使用它。
I don't think there is any particular significance, beyond its appearing as the example 'expires' date in RFC 1945: Hypertext Transfer Protocol -- HTTP/1.0 dated May 1996. At least some of the text would have been written much earlier, indeed RFC 1738: Uniform Resource Locators (URL) is dated December 1994.
At the time of writing it would have been a reasonable example value. In the same way the 'date' header example in the RFC 'Tue, 15 Nov 1994 08:12:31 GMT', is prevalent in the web. The two values together form a consistent example.
In RFC 1945 there's no mention of a specific default value, however it states
Implementors of servers will have read the RFC - they'd need to in order to know what to implement - and picked up the example date given, and used it.
您可以查看这30秒来了解为什么会这样。它基本上是技术文档中的复制和粘贴值。
You can check this 30 seconds to see why it is like that. It's basically copy and pasted value from technical documentation.