Website performance optimisation

Oct 19, 2007

We all want faster websites. We all know there are different website performance optimization techniques out there, but some are technical, some aren't practical, and some only apply to large businesses with loads of traffic. Some improve the statistics, but have no effect on actual speed.

Some of the best techniques are totally obvious, cheap, and easy to implement.

This is the first in a series of posts on how to improve your website performance, to make it go fast. My experience in this area comes from writing Jojo CMS - a process of testing, implementing, testing until we got the formula looking right (and no, we won't ever get it 100%).

What we optimise

  • Percieved performance is most important
  • Get something for the user to read ASAP
  • Reduce file sizes = less to download = faster
  • Reduce HTTP requests = less lag time = faster
  • Optimise code / database load = less CPU load = faster

Percieved performance

Actual performance is far less important that perceived performance. If your website "seems to be fast" then for all intents and purposes, it "is fast". The simplest tricks can be used to make a site seem faster, such as a progress bar on a file upload to encourage people to wait "just a bit longer".

Get something for the user to read ASAP

People are quite happy to start reading some content while the remainder of the page loads. So make sure you deliver the readable content as soon as you can.

Reduce file sizes

If it's raw grunt we are talking about, then filesize has to be the key metric. For dialup users especially, filesize is a bottleneck. How can you reduce the filesize of your pages? I like sites that are between 50 - 150kb for the homepage, and with most of the content cached in the browser for when they click on the second page. The FirefoxWeb Developer Toolbar extension has a great feature for viewing document size.

Reduce HTTP requests

HTTP requests is the oft-forgotten part of optimizing your site. Quite simply, less is more. Count the number of files that are required to display your page, including HTML, CSS, Javascript, Flash and images (don't count anything the user has to click to download).

Do everything within your power to reduce this number of files without compromising user experience / accessibility, and don't be afraid of getting creative. Savings of 50% and more are possible when you open your mind to new ideas.

Optimise code / database load

With many dynamic websites, Jojo included, nothing is sent to the user until the server side processing is complete. This is usually a delay of 10 milliseconds (ms) to several seconds (in extreme cases). Any optimisation that can be done in this area leads to a clear increase in actual and perceived performance. The finer points of this depend on your platform, CMS, or code, and can be vastly complicated. So start with the obvious stuff before taking on the difficult jobs.

Low hanging fruit

Micromanaging website speed takes years to learn, and whole teams of people are involved in making high traffic websites work efficiently. If you don't have this kind of experience or resource, start with obvious improvements that have real-world benefits.
I would say to start with the "low hanging fruit" but it's possibly more appropriate to start with the fruit on the ground first. If you spend a few moments looking at your site with the right tools, it should be clear where to start.

I'll be covering these in the next posts. Why not subscribe to our RSS feed?

Your Comments

Dunken Francis - Nov 1, 2007

What would your advice be if displaying video clips? Assume dial up still (as NZ broadband still seems snail-like compared to my old home in the UK...) and display lores? Or work on the principle that if you are searching for video clips you have a decent connection?

post a comment