views:

54

answers:

1

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?

A: 

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

Note: Applications are encouraged to be tolerant of bad or misinformed implementations of the Expires header. A value of zero (0) or an invalid date format should be considered equivalent to an "expires immediately." Although these values are not legitimate for HTTP/1.0, a robust implementation is always desirable.

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.

martin clayton
Hmmmm but why do so many responses from WebSphere and other web servers contain "Expires: Thu, 01 Dec 1994 16:00:00 GMT". This date must be set by something somewhere (eg a Method that returns that as the default expiry date for a date in the past). If you search google for that date you can see that many other people get responses that contain "Expires: Thu, 01 Dec 1994 16:00:00 GMT". I do not believe that it is a coincidence.
Jake
@Jake - I'm not saying it's coincidental. The authors of WebSphere and other web servers will have seen the date in the RFC and used it to signify "expires immediately". What you say is therefore true - it is coded in those apps. I've added a note on this to the answer.
martin clayton