Mod_pagespeed versus manual optimisation
Mon 11th Sep 2017
When we first started looking at making page speed improvements to our projects, we were very excited by the prospect of all the hard work being doing for us using the Apache mod_pagespeed module – something that, with the appropriate configuration, can automatically optimise your images, CSS and external scripting files to deliver a more page speed-friendly experience, without requiring any ongoing intervention.
The module configures in easily enough and by default plays it rather safe, only making changes that it knows are very unlikely to cause you any problems. You get plenty of configuration options too, for greater flexibility.
Our first impressions were pretty good – it gave us a significant jump in page speed score with no real configuration, though admittedly it was on a site that was ripe for a high score through optimisation anyway – where your site is more complex, your mileage will definitely vary.
We did start hitting problems, however – it doesn’t work particularly well at dealing with dependencies and we found that some sites just didn’t load in consistently; and when we ‘upped’ the potential gains through configuration, the problems became more apparent.
We also had problems with how it impacted all the sites on a server – as an apache module, it is put into play for all sites by default, and we discovered that whilst it was working well for one site, another had basically fallen on its knees (this is all on our development server, of course!). Care, attention and ideally per-site apache instances would be the order of the day if you wanted to deploy it on a multi-site server.
In the end, for us, Page Speed is better done manually – it’s tailored to the site you’re optimising, and will always – in our experience and opinion – give you better results. It’s also more testable, as you know what you’re working on that might break.
Mod_pagespeed is certainly better than nothing, but it’s not the real answer to getting the highest possible page speed score for your site – like most things, there’s no shortcut for the right way….at least, not yet.