Increase Site Speed (and Revenue) in 10 Steps
By
Ian Lurie
Facebook
Facebook
Twitter
Twitter
LinkedIn
LinkedIn
Email
Email
0 Comments
Comments
If you're looking for an easy revenue win, make your e-commerce web pages just a little faster. Web page load time correlates very strongly to e-commerce conversion rate. It's a fact, slower pages generate fewer sales.
Making slow pages faster is usually a cinch, so the fact that so many sites load as if they're steam-powered drives me a little batty. Help my sanity, and your bottom line, by trying these 10 fixes:
- Compress images. Pooh-pooh if you like, but I just went to three different major retail sites, and every one could have reduced page load time by at least two seconds by opening a photo editor and reducing file size.
- Scale images in your photo editor, not HTML. Resize images before you upload them to your website. Don't use the HTML height and width attributes to squash an image down to size. Average time saved in my informal retail survey? Half a second. In e-commerce time, that's an eternity.
- "Minify." All web page scripts have spaces, tabs and line breaks. Those empty spaces actually take up, well, space. Remove them and you reduce file size. You can use one of several "minification" tools to squash your files down to size. Use minify on style sheets, JavaScripts and page HTML. Note: Keep the originals unminified. Editing minified code is less fun than shaving a rabid weasel.
- Remove big JavaScript blocks to .js files. Most e-commerce sites have huge blocks of JavaScript code embedded in every page. Compared to a bloated image file, that may seem small, but it adds up fast. Move those scripts to external .js files and include them in the page that way. Then visiting browsers will cache — that's nerdspeak for saving a file on a computer's hard drive so it doesn't have to request the file again — the JavaScript, and your server will only have to deliver the files once.
- Put code in the correct order. Load CSS style sheet files first, then load your body content, then load JavaScript. Doing so minimizes the time a visitor has to look at an unstyled page, but lets them see the page as quickly as possible.
- Turn on http/GZIP compression on your server. It's not hard. In Internet Information Server (IIS), you check a box. On Apache, you install mod_deflate, mod_gzip or something similar. Once you do that, the web server will compress files as it sends them to the user's browser. Ninety-nine percent of browsers then decompress the files and display them. For the other 1 percent, the server delivers noncompressed files. That can cut page load time in half. Not bad for checking a box.
- Activate database caching. It's rare to find an e-commerce system out there that doesn't support database caching. When activated, this nifty feature lets the server store page information in memory so it doesn't repeat database requests. Since database requests are among the slowest server functions, this can be a huge time-saver.
- Set far future expires headers. This gets a little geekier. Some files, like your logo or the "Buy Now" button, rarely change. You can have your server send a message to browsers that says, "Cache this forever, please." That greatly increases perceived page load time.
- Defer JavaScript parsing. It requires some troubleshooting, but if you can load and parse JavaScript after everything else on a web page loads and displays, the perceived load time gets even shorter. Google gives a great explanation of deferred parsing.
- Set up a CDN. CDN stands for content distribution network. It's a storage network optimized to deliver "static" files like images as quickly as possible. If you aren't already using one, setting up your site to use a CDN is fairly simple. You'll see immediate, sitewide performance gains. And, as an added bonus, your server will better handle traffic spikes since it doesn't have to deliver static files.
0 Comments
View Comments
Ian Lurie
Author's page
Related Content
Comments