60 Seconds to a Faster eCommerce Site

March 22nd, 2010 by Doug Bright

Google engineer Matt Cutts recently made some remarks that implied Google was ready to start penalizing websites that were too slow. He also hinted that it might not just be a token nod, either, and that site speed could become a major ranking factor in search engine results. So what can you do to help speed up your eCommerce site?

No Shortage of Options

The good news? There are hundreds of ways to squeeze better performance out of your site. The bad news? There are hundreds of ways to squeeze better performance out of your eCommerce site.

You’ve got a list of a million things you want to improve on your site. You can’t put them all aside to begin a comprehensive new initiative to speed up page load times. So what are the things that can give you the most bang for your buck?

Three 60 Second Tweaks

If your site uses Apache as its web server (most do) and you host it yourself you have access to 3 quick tweaks that can yield some serious speed results.

1) Enable CSS and JavaScript compression. In modern sites, CSS and JavaScript can comprise the majority of each HTML page. By letting Apache compress them before sending you’ll cut their size by up to 90%. Just ass this code to the .htaccess file in your website root directory:

<IfModule mod_deflate.c>
<FilesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

2) Set a future expires header for your product images. If you’re like most retailers, you product images don’t change too often. Take advantage of that by allowing users to cache your product images for longer periods of time. By setting a product’s image to expire a month in the future instead of a minute or an hour you give users a snappier experience while decreasing your server load. Of course, then if you update your image and you don’t want your users to have to wait a few weeks to see the new one you’ll have to change the image file name for the browser to get it. To set a cache for your product image files, add this to the .htaccess file on your web root directory:

<FilesMatch "/products/.*\.(jpe?g|png|gif)$">
ExpiredActive ON
ExpiresDefault "access plus 1 month"
</FilesMatch>

The above example assumes your product images are in a directory called “products”. You’ll probably have to change that and maybe get a little creative with the FilesMatch regular expression syntax to get this just right. You can learn how FilesMatch works here.

3) Disable ETags. ETags are designed to allow browsers to check in with your web server to see if its already got a particular image or other component cached. So using them should, in theory, speed up your site. But there is some weirdness with the way that Apache constructs them that makes them not work very well for sites that have more than one web server handling the load. Unless you have just one web server or have a specific ETag caching strategy in place, you’re better off disabling the functionality since it reduces the overall number of requests a browser needs to make. To disable ETags, add this code to the .htaccess file in your web root directory:

Header unset ETag
FileETag None

Time’s up

That wasn’t too bad, was it? By doing just these three things you can significantly reduce your site load time and avoid any coming Google penalty without investing too much time and effort.

| More

Tags: , ,


Add Personalized Product Recommendations to Your eCommerce Site

Istobe is a powerful recommendation engine that makes it easy to add recommendations to your eCommerce site. How powerful? Shoppers who click on Istobe recommendations spend 20-50% more than the average visitor.


Leave a Reply