PHP is using:
Expires: Thu, 19 Nov 1981 08:52:00 GMT
I don't understand this 100%. A cache could have a different idea about time. Although it's really rare, a cache could think it's 1980. In a case like that, the cached copy will be seen as fresh.
you can avoid problems like that. So in my opinion PHP is choosing the second best solution instead of the best solution.
A cache recipient MUST interpret invalid date formats, especially the
value "0", as representing a time in the past (i.e., "already
So when using the value "0", you know for sure it will be seen as a date in the past. But this is the protocol for HTTP/1.1 (not HTTP/1.0).
I was also searching for some information about HTTP/1.0 and invalid dates, but I could not find an answer. I know HTTP/1.0 CAN implement things from HTTP/1.1.
How HTTP/1.0 caches are dealing with invalide dates? And can I be sure that in all situations "Expires: 0" will be seen as a date in the past? And if no, do you have examples?
I saw Google is using:
In the past people were setting Expires
via html via the meta tag ... in cases like that "-1" could mean something different than "0", but in what kind of situations "Expires: -1" means something different than "Expires: 0" in the http headers?
So what to use? Date in the past, 0 or -1?