Well, it only took me 18 months, but I finally got around to cleaning up and publishing the Phing filters we use to automatically transform a static site into one that implements many of Yahoo’s Exceptional Performance Rules. These filters, together with the Apache configurations in the README, implement the process outlined in this talk from php|works 2008:
To see it in action, first create an
VirtualHost pointing to the
mysite directory in the project as the web root. Then run:
% phing optimize
which creates a parallel site in a
build directory. Point your
VirtualHost to the new
build directory to see the same site with the performance transformations.
You could run this Phing task in a continuous integration process as part of deployment. You could run it at production deployment time, but it’s probably a good idea to run it at staging time in case it flubs on some CSS or HTML syntax that it is not expecting.
Note that there are other miscellaneous Phing tasks in that github project. I threw these in there in case they could be of use to other Phing users.