Hydrothermal
Hydrothermal

Reputation: 5081

Why does WordPress use 11 Jan 1984 as an anti-caching value for Expires headers?

The Expires header can be set to a date in the past to prevent caching, although this seems to be regarded as an unusual practice. Any date before today should work for this purpose, but Wordpress uses the very specific date of Wed, 11 Jan 1984 05:00:00 GMT for some reason. I'm pretty sure that WP is the origin of this practice since all discussions involving this date appear to be about WordPress, and this article specifically calls out the Expires header value as a sign of a WordPress server. This blog post remarks upon the unusual date but has nothing very useful to offer about it (unless the cache control headers are meant to honor the death of Fritz Geissler).

It seems to me like it would have been better practice to choose a more generic timestamp like 1 Jan 1900 00:00:00 GMT to avoid surprise at the specificity. It has demonstrably caused some degree of confusion (albeit not much), as can be seen from this forum post. Does anybody know what this date's significance is or why the WordPress developers chose it? I can only assume it's some kind of Easter egg, but it'd be neat to find out the details.

Upvotes: 10

Views: 2845

Answers (1)

s3cur3
s3cur3

Reputation: 3025

Looks like this goes back to WordPress version 2.1.

Doing a bit of digging, the first use of this date in a functions.php was in commit 2623, where it was used in the nocache_headers() function.

Prior to that, it had been copied & pasted around a few times. I think the first instance of this was commit 1983, where the non-cachable date in one case was changed from the birthdate of "Michel" (maybe Michel Valdrighi?) to the 1984 date. The message on that commit is:

Don't cache. No, really. Hat tip: Kimmo Suominen.

That commit came from Matt Mullenweg, whose birthday is listed as 11 January 1984 by Wikipedia.

Upvotes: 15

Related Questions