Learning HTTP Caching and PHP (27th February 2007)
In short: it’s way out of my league but I’ve got something with basically works. It seems you have to know all the following (and maybe even more) before you even get started:
HTTP 304: Not Modified by Anne van Kesteren was also helpful. I now understand enough to make PHP generated pages just about work with HTTP caching.
Testing with Web Sniffer was the most help:
They return a 304 Not Modified response status without sending the page if:
- The content’s modified date is at or before the
If-Modified-Since
request header. - The content’s
ETag
exactly matches theIf-None-Match
request header.
I ’ve only applied this to the Calthorpe Park School test site. I don’t think it is a complete implementation and it’s very messy. It’s working with the caching Firefox 2.0.0.2 and Internet Explorer 6 do but I want to do more testing and tidying before I show it on any forums.