Don’t call me DOM

10 March 2006

Doing HTTP caching in PHP

Filed under:

Since the Mobile Web Best Practices highlights that caching is a particularly important feature when browing the Web on a mobile device, I just wrote a new associated technique on how to do proper caching when using PHP.

While Mark Nottingham’s excellent tutorial on the topic covers most of it already, the technique provides some additional code example, as well as some illustration as how to use it with MySQL.

Nothing ground breaking, but I’ve been using this code in most of my PHP applications over the past years, and it certainly gives a nice and warm feeling of being a good HTTP citizen when you pass the Cacheability validation.

Picture of Dominique Hazael-MassieuxDominique Hazaël-Massieux ( is part of the World Wide Web Consortium (W3C) Staff; his interests cover a number of Web technologies, as well as the usage of open source software in a distributed work environment.