Mod_pagespeed - Why So Hasty Just Yet?

The net’s been loud with google’s mod_pagespeed lately.

According to the project page:

mod_pagespeed is an open-source Apache module that automatically optimizes web pages and resources on them. It does this by rewriting the resources using filters that implement web performance best practices. Webmasters and web developers can use mod_pagespeed to improve the performance of their web pages when serving content with the Apache HTTP Server. mod_pagespeed includes several filter that optimize JavaScript, HTML and CSS stylesheets. It also includes filters for optimizing JPEG and PNG images. The filters are based on a set of best practices known to enhance web page performance. Webmasters who set up mod_pagespeed in addition to configuring proper caching and compression on their Apache distribution should expect to see an improvement in the loading time of the pages on their websites.

This all sounds very nice, so what are my objections? Read along.

First, I’m always very critical of automatic optimisation techniques. They shade developer responsibility and awareness and can do some disastrous, unintended modifications in the background.

My points are:

  • A web developer should have a clear knowledge about optimization techniques and do them in the template, css, etc.
  • Don’t impose additional load on the web server just because you lack the knowledge or you’re just lazy
  • There’s much more to web sites than performance. How about SEO? Are you sure that an automatic reorganization of your html source is SEO friendly? Maybe mod_pagespeed is harmless in 99% of the cases, but still TAKE A DAMN LOOK.
  • mod_pagespeed can be a very nice tool supporting development, though! You can use it to check out possible optimizations, opportunities that you might have missed. Use it as some kind of HTML+CSS template generator that transforms your first-run code to something possibly more optimized which you can alter by hand.

So as a summary, I’m sure mod_pagespeed can be a very nice tool in development mode to spot possible optimization opportunities, and also for large static-html CMS, etc. providers so that big chunk of unoptimized and messy static html pile gets a major performance upgrade, but I’d encourage every web developer to do these optimizations by hand or semi-automatically.

Comments

Copyright © 2013 Csaba Okrona . Powered by Octopress