In April 2010 Google announced that they would be taking site loading time into consideration when ranking pages within its search engine. As every SEO knows, ticking as many boxes as possible in the great ‘Google Algorithm’ is a must, and on page fixes like slow loading times are an easy win, so how exactly would you go about increasing the speed of your website?
The most common things that causes slow loading times are:
- Large images
- Too many images
- Invalid code
- Slow web servers
- Large headers that reference scripts
Although there are other things that can slow loading times, the above are the ones that can significantly reduce the speed of your site. Let’s take a closer look at each point:
As a general rule, you should try to keep your images to around 20 – 50kb; this can be achieved by using PhotoShop (or Gimp) and editing/cropping the photo to make it smaller or by saving it at a lower quality.
It is also important to re-size your images BEFORE uploading them to your website, and always avoid using CSS to resize images as this will slow down loading times further.
Too many images
It’s common to see too many images on a website, especially if you’re reading a large article and it has informational images throughout or simply because the website is image heavy. The best way to optimise a website with lots of images is to use a ‘CSS Sprite’. By using a CSS Sprite only one large image will have to be loaded, which is generally faster than loading all of the images individually.
- Check you have written clean code, which cannot be condensed in anyway – remember the rule of code – never repeat yourself.
Slow web servers
Of course the speed of your web hosting provider can affect your page speed, going for the cheapest hosting solution almost guarantees a slow load. Try to go for a more premium hosting company like Media Temple, Rack Space or Amazon – also try to find one that provides SSD’s rather than regular Hard Drives, they’re much faster, a budget host will most likely not use these.
Large headers that reference scripts
Just because scripts are referenced in, rather than pasted into the header section which makes the head section look smaller – it doesn’t mean they load any faster, in fact they will load slower.
Referencing scripts from 3rd party websites involves the server making a HTTP request. This can potentially slow down your website by quite a lot. When referencing scripts always try to download it and host it on your own server, this not only makes your site load a bit faster, but it’s also more stable since it doesn’t matter if the 3rd party website goes offline.
However, Google does have a CDN for bigger scripts like jQuery – since it’s Google they do have fast, secure and reliable servers so there isn’t a problem using these.
If you do hosts the scripts yourself, remember to minify them!
Too many plugins/widgets
If you’re using a CMS like WordPress it’s easy to get carried away with lots of fancy widgets, however these do and will slow down your loading times.
When installing a plugin, take a moment to think whether you really need it OR if you really need a plugin at all to achieve whatever it is you’re trying to achieve. In a lot of cases, the plugins you install will be very simple, for example the WordPress UI plugin which allows you to easily input accordions and tabs into your site; the problem is if you only want Tabs and are not planning to use any of the other features it means you are loading a lot of un-necessary code on every page load.
In the above example, you could simply create your own tabs CSS and HTML, there are plenty of tutorials online explaining how to do this.
Now you know what could be causing your website to load slow, it’s time to do something about it – check out our ‘Speeding up a WordPress site’.