Google Apache Page Speed Optimizer

Google has released a module for Apache that, if it does what they claim, sounds like something everyone running Apache should get (of course it probably won’t come shipped standard due to the inevitably possible compatibility issues that can arise from the type of modifications they’re doing to the output of your pages).
It’s called mod_pagespeed and the code page (where you can get it) explains what it does to optimize all web pages served on Apache. They provide a list of the filters which the mod implements to actually rewrite the output of your pages in a way that results in less traffic and better browser rendering. How? Well, take a look at this example:

The “CSS Combine” filter finds all CSS tags. If there was more than one in a flush window, it removes each of those links and replaces them with a single to the merged document, which it places wherever the first CSS originally was.

In other words, the module will take all your CSS files, combine them into one big CSS file, and alter your link to point to the new consolidated file. This is something that can really ease the workload on someone who has dabbled in optimizing page speed. Now you don’t have to have separate development and production copies of your CSS files. This will smush them together for you.

It can likewise minify your javascript for you! No more running your code through JSLint. Your web server will handle that.

Simple. Awesome. I have yet to test it out, but this is a great idea. Manually doing these tasks is a waste of time. This could well become a must-have for any self respecting web dev.

Leave a Reply