Practical Tips On Speeding Up Your Website

I got a mail the other day from one of our readers asking about speeding up one’s websites. They mentioned that Google indicates that 97% of the sites out there are faster than theirs. What they wanted to know was some practical tips on speeding up their website.

As I analysed the site I soon came to realise that this person’s speed problems are similar to most web sites. So I thought I might share some of those findings with you.

Pictures

Pictures are very important to a website today. Without them sites are boring and lifeless. But pictures can be your Achilles heal. Be careful with the size. I am not talking about the height and width, although this will be an issue, but the actual file size.

The bigger the picture, the bigger the file size. The bigger the file size the longer it takes to download. More pictures, much much slower site.

Reduce the size of your pictures by effective jpeg compression. Compression is very similar to zipping files. You know the old winzip. It’s when you take a file and compress the size so that it’s total size is much smaller.

Without going into any compression details, all that happens is that your picture file size is reduced. The pay off is quality. The more you compress your picture the worse the quality becomes. You have to play with the different settings to see what you are happy with. Different pictures will compress differently depending on the size and colour.

Depending on the resolution of the picture (height and width) aim at below 40kb, 50-30kb is better. Aim for a good quality to size ratio. Make sure your images are at least hosted on your site. You could even use a content server where your static pictures are hosted and server from a content server closer to your actual hosted server.

Using pictures on your site that are actually hosted somewhere else means that there is extra time spent on looking up the server, then downloading the picture. You are then at the mercy of the third parties server and network speeds.

DNS look-ups

A DNS look-up is when your website needs to find a particular piece of data hosted somewhere on another server. Your website has to go out and find that server and resolve it’s name. This takes time. So many sites use pictures, JavaScript, Widgets that are hosted on other servers. They sit at the mercy of the reliability of the other sites and servers. Some are unavoidable and need to be accepted but most can be changed. External JavaScript hosting is a big one. Try as much as you can to host any JavaScript you use on your own site. Host your own pictures.

There is also huge speed degradation with DNS Lookups and Ads or Affiliate marketing. Many of these give you a small piece of code to put on your site so that they can serve dynamic content. Once again, you are at their mercy. Their response times affect your response times. Make sure that your ads and affiliates are worth the trade off. But keep in mind that the trade off is that you rely on the speed of the affiliates site and whether you can get to it at any particular moment, and the amount of money that these ads and affiliates are bringing in.

Code

Make sure the code is correct and clean. Make sure there are no “Not Found” Errors. This could be as a result of an external server timeout because of your external DNS lookups. Do you need to use iframes? An iframe is basically a small area on your website that hosts another page from another site. This is mostly used in ads and affiliate marketing. Even though I don’t like iframes, it’s a good trade-off. Because having your ads and affiliates in an iframe means that the rest of your site can continue loading. Break your page up into more logical categories. Don’t try and show everything on one page.

Be careful when using tables. Data in a table is not rendered in the browser until the whole table is downloaded. Large tables can give the impression that the site is hanging. Compress your JavaScript and CSS files. There are lots of white space and comments that do not need to be downloaded. Compressing (minifying) these files will reduce the download time by a lot. Make sure your static components are cacheable. Things like them graphics, CSS and JavaScript files.

Conclusion

I hope this helps you. Always be mindful of the person on the otherside of your site. On the browser side. How long do they have to wait? Now this is also a very grey area as some countries have huge bandwidth while others have very little bandwidth. But then again, speed is relative isn’t it.

SHARETweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Pin on PinterestDigg thisShare on RedditShare on TumblrShare on StumbleUponEmail this to someone

Robert Bravery is a professional programmer, Web site Developer and professional blogger for Integral Web Solutions.