What Would D-Mac Do

.....

Thursday, November 4, 2010

Mod_pagespeed - Google Makes You Fast

Yesterday Google unveiled a new Apache Filter set. It's a logical extension of Google's Firefox/Firebug PageSpeed Plugin. Rather than simply pointing out all the ways your site sucks up load-times, mod_pagespeed automatically takes care of issues, thus eliminating the leg-work of going in and doing it yourself. The fundamental purpose of this tool is to make your websites pages load quicker (50% quicker if the company's findings are to be believed). This is particularly of importance to large catalog sites commanding lots of scripts, database calls, CSS and images that wreak havoc on a less-than-stellar connection's ability to render something on your screen. It's been no secret that Google is now factoring in load-time into the algorithm.

How it works:

Mod_Pagespeed is for Apache 2.2 (no previous versions are currently supported). In order to use this tool, you'll need root access to your server so shared hosting accounts are out of luck (however, GoDaddy is poised to launch the mod on their entire network of sites so their customers have that to look forward to).

The mod_pagespeed is installed and tweaked through the pagespeed.conf file. From the onset, the HTML editor's primary purpose appears to be to clean up messy HTML often rendered by sites that aggregate things from multiple sources (combing multiple Head sections into one source, adding the Head where it doesn't exist etc). In addition, a CSS and Javascript Mod comb through scripts and CSS to send large blocks out to separate files to be cached by the browser (I'm curious as to how this balances between excessive scripting on a page and calling excessive files to load). Beyond that, there's some general bone-headed functionality such as a mod that scrubs out white-space in HTML and removes HTML comments (there are still misguided SEO's who attempt to keyword stuff with html comments. I know because I've met them and listened to their "get rich quick on the internet" sermons). I don't mean that as if these aren't valuable components though. In many instances, these sorts of minor issues build up across a site to the point that they become a legitimate threat to a solid user experience. A single resource to scrub these issues out is invaluable to a site that's been around for 10-15 years with loads of legacy lurking in the code. Beyond that, there's a suite of various speed enhancement tools with the built-in mods which you can tweak at will to your liking which you can find here (you can even set it to remove any and all scripts on your pages if you are that sort of glutton for punishment).

Why This Is Good:

This truly is a case of "What's Good for Google is Good For You". By reducing the noise-to-signal for spiders to access content (by eliminating scripts and CSS from the crawl) Google is also making a smoother ride for search engine spiders. This appears to be a logical place for Google to go, given the Caffeine update and the overall interest in maintaining as fresh of an index as possible. The easier it is for spiders to access content, the faster and more frequent they'll be able to do so. The upshot for users is that these tactics actually WILL help pages load quicker. With all the ways of accessing web content (DSL, 3G, 4G, Dial-Up, Ethernet ad nauseum) accessibility cannot be ignored. Based on where mod_pagespeed is carving out server-load, this tool will be particularly popular with catalog and aggregator sites (I suspect they constitute the majority of the 50% load reduction crowd). Not only will this tool produce efficient pages, but it does it on the fly, eliminating the burden of an IT team to go fishing for efficiencies (obviously each install still needs to be tailored to its users' needs).

So this is truly a win/win situation. Users get a more efficient experience, and spiders can index content faster.

Since this is an open source project, patches will likely come in droves in the next few months. Maybe an enterprising soul could even create a .Net/ASP version of mod_pagespeed :-)

No comments:

Post a Comment