Apparently, one of the factors that affects your Google ranking is how long it takes for a page to load. I doubt this will make an enormous difference to your ranking unless it is very slow, but it is worth considering, especially if you are in a very competitive industry and you are working hard to claw your way to the top.
Google don’t just use statistics from their bots though, they actually use data on load times from their toolbar that runs inside people’s browsers. That gives them a better idea of how long the page takes to load.
People do care how long it takes for a page to load. If your website is responsive and pages load instantly, they are more likely to hang around. If they have to sit and wait, even for a few seconds, they lose patience easily. That could make quite a difference to your conversion rate. Equally, Google monitor your bounce rate and how long people stay on your website. I’m not sure if they use that for ranking, but it is definitely worth bearing in mind.
In addition to worrying about the server hardware and how heavily it is loaded with other websites/services, bear in mind that the following also affect page load times: –
- server side code that runs when the page renders, especially if you access external systems including databases
- HTML size
- size of images
- CSS size
- number of images/css files/script references on the page
- distribution of images/css files/script references across different domains (browsers usually limit how many files they will read from a single domain at a time)
- speed of data loading from other services
- caching policies and loading common references from CDNs or locally
- the position of css and script references on the page
OK, so what can you do about all these? There are plenty of articles on these topics, so I’m just going to go through the basics and leave it to you to Google for the latest info.
Have a good long think about whether your HTML is as simple as it can be. It really shouldn’t need to be a tag soup in order to look good. You might have to make some minor visual sacrifices to save a lot of complexity. Think about whether clever use of CSS can save a lot of HTML.
Have a think about whether your CSS is organised well and logically. Can rules be combined?
Can you reduce the number of images? Is it worth simplifying the design? Do you actually need all the pixels you have on repeating images (eg. gradients only need to be 1 pixel wide/high, covered areas of images might be croppable). Make sure you are saving images in an appropriate format and compression level.
Look into image sprites.
Loading from multiple domains
Work out whether to have referenced items stored locally (even if on another domain) or loaded from an external source. Many common libraries, such as jquery are hosted on public CDNs. There is a reasonable chance that a visitor may have it cached in their browser from there. On the other hand, some external references may be slow, might not be minified/compressed etc and it may be worth considering whether you can host these yourself (factoring in the pain of having something else to update unless you come up with a clever caching system). Don’t forget to test this, and don’t forget that your visitors are likely to be coming from all over the world. If they load a page from the other side of the world, they will be faster accessing a CDN than your local server.
Make sure that your visitors aren’t needlessly reloading files that haven’t changed too much. Ensure that you have appropriate headers set up to control caching. This is a complex subject and you might want to spend some time reading up on it.
There are loads of things that you should test. Monitor the sizes of the various different files that load, the numbers of files, the load time etc. Do this using browser tools (many browsers have it built in), external web services such as http://analyze.websiteoptimization.com/wso and http://www.webpagetest.org/ . Don’t forget that different browsers respond differently, as does different hardware, different platforms (don’t forget mobiles and tablets these days!), different ISPs and different locations.
Some other tools that are worth looking at are YSlow and Google Page Speed.
This can all be pretty time consuming, so the question is whether it is worth it. It really depends on whether you are having major problems at the moment, how big and important your site is and how much you think it is affecting your visitors. That’s something that you need to think about and decide on.
Have I missed anything? Let me know!