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

Harish Narayanan harish.mlists at gmail.com
Sat Jan 23 16:14:06 UTC 2010


On 23/01/2010 15:37, Austin Matzko wrote:
> On Sat, Jan 23, 2010 at 7:58 AM, Harish Narayanan
> <harish.mlists at gmail.com> wrote:
>> WordPress feeds seem to set both Last-Modified and Etags in the HTTP header:
> [snip]
>> but posts and pages don't seem to:
> [snip]
>> 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.
> 
> WordPress sets those tags for caching feeds because the
> strictly-defined structure of the feed makes it easy to determine
> whether it has changed (and therefore should no longer be cached).  In
> contrast, it would be almost impossible for core WordPress to
> determine whether the content on a regular page load has changed.
> 
> However, you can use the 'send_headers' action hook to modify the
> headers for your own specific situation.

Thank you. I will play around with that!

Harish


More information about the wp-hackers mailing list