5

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?

1
  • The HTTP date format, for some reason unknown to me, includes the day of the week so calculating a date in the past, implying 'do not cache', is not completely trivial. So, people use the spec date.
    – jarmod
    Commented Nov 1, 2018 at 20:14

2 Answers 2

6

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.

2
  • 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
    Commented Sep 29, 2010 at 6:54
  • @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 s ignify "expires immediately". What you say is therefore true - it is coded in those apps. I've added a note on this to the answer. Commented Sep 29, 2010 at 9:08
0

You can check this 30 seconds to see why it is like that. It's basically copy and pasted value from technical documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.