Home Projects Google Pagespeed

Google Pagespeed

In late 2010, Google made some announcements about upcoming search ranking algorithm changes. The big two under discussion were page speed and content. As much as I enjoy writing and being creative - I really do! - I was more intrigued with how I could make my website faster. I was determined to focus on my main website, QBike.com, to start.

I started with the standard we had set at CNET.com that pages should be no more than 200K in size, including images. I has always strived to keep images on QBike optimized, sizing them appropriately for wherever they needed to display on pages. The thing is, CSS and JS bloat now came into play more, using excessive tables was a rendering problem, and there were lots more browsers and versions of those browsers to take into account.

Google Pagespeed was the primary tool I used to make my website faster. I also used the following:

Here is a summary of the things I fixed, tweaked, or otherwise fiddled with during the subsequent 4 months of optimizing QBike.

  • Compression - enabled compression for all file types in Apache, tweaking in .htaccess files as necessary
  • CDN - signed up for an Amazon Cloudfront account and store 50% of my images on it
  • Parallelization - added code so that image downloads are round robined from QBike and the CDN, as well as from eBay and other external sites where possible
  • Sprites - I built 3 sprites for where they were most needed and deployed them along with the requisite CSS
  • CSS - removed excess code, combined files, removed any includes, minified, and optimized per each section of my website
  • Tables - where possible, tried to change tables into div tags
  • JS - combined where possible, minified, and placed at the bottom of page when it made sense to do so
  • HTTP Headers - specified cache settings per file type, added expires, removed the eTag settings where I could, and tested like crazy to see that caching brought about the speed gains I hoped they would
  • CGI - I used perl libraries to analyze code blocks, e.g., excessive or expensive string compares, and optimized search code so that search blazed

There were more changes, but this is a decent summary of many of the key items. Suffice to say, I would check QBike wherever I was to get a new, unbiased look at the site and its speed. And I was always impressed with the sheer speed I found, whether at a friend's house with slower internet speed or at the Apple Store or in a hotel using shared WIFI. QBike was lightening fast!

I referenced the Google Webmaster Lab rating for QBike to gauge speed. Initially it was marked as "worse than 85% of all websites" - unbelievable! After 2 months, I got it to "worse than 60% of all websites" which, while still not good, was a big improvement. The highest I ever got it was "in the top 25% of websites" for a brief time. I'm not entirely convinced that these speed figures are entirely reliable, but hey, it is Google reporting it, so I had to pay attention. The thing is, Google often would include a link redirect script that was used for products in the speed results, and the speed of those links depended entirely on the remote site I was linking to. So, I modified the robots.txt file and created a subdomain to handle those links, all intended to offload any "slowness" as seen by Google on my main QBike site.

4 months may seem like a long time to work on something like page speed, but there were a whole lot of moving parts involved, and many steps to fix and test. Except for some caching problems with dynamic URLs, QBike is now optimized and super fast.

Google Pagespeed

Newsletter Subscription
Follow me on:

Latest news

  • Twitter Bootstrap
    Twitter Bootstrap 3.0.0 RC1
    It's here - and now just one CSS file
    Time to bootstrap more websites!
  • QBike Store News
    QBike Store 1,000th Sale
    QBike just surpassed 1,000 sales
    That's 1,000 satisfied customers and counting!

© 2012-2013, All Rights Reserved