[wp-hackers] Setting Last-Modified, Etags everywhere

Harish Narayanan harish.mlists at gmail.com
Sat Jan 23 13:58:56 UTC 2010


This question popped into my head when I stumbled onto the following
service that attempts to sniff out the state of one's blog:
http://ismyblogworking.com/emphaticallystatic.org

WordPress feeds seem to set both Last-Modified and Etags in the HTTP header:

$ curl --head http://emphaticallystatic.org/feed/
HTTP/1.1 200 OK
Date: Sat, 23 Jan 2010 13:44:13 GMT
Server: Apache
ETag: "4ca50ca96aad627907309ef8a93922b0"
X-Powered-By: PHP/5.2.12
Last-Modified: Thu, 21 Jan 2010 21:25:10 GMT
Content-Type: text/xml; charset=utf-8

but posts and pages don't seem to:

$ curl --head http://emphaticallystatic.org/
HTTP/1.1 200 OK
Date: Sat, 23 Jan 2010 13:44:22 GMT
Server: Apache
Vary: Accept
X-Powered-By: PHP/5.2.12
Content-Type: text/html; charset=utf-8

Is there some reason for this? I believe it might have something to do
with how fancier pages might be generated (e.g. pulling different bits
of dynamic/static content from different servers). But if there isn't a
reason not to, I would like to try to add these fields to all WordPress
generated content.

I think that would help browsers with caching, though I might be missing
something obvious.

Harish


More information about the wp-hackers mailing list