Sunday, July 5, 2009

Speeding up your website - Yslow and Page Speed

There are a number of tools you can use to improve the speed of your website. Why are they important? Well as a user you would appreciate that a slow loading page is always a turn off. If you have to wait too long you may go elsewhere.

Yslow (Yahoo) and Page Speed (Google) both have Firefox plug-ins you can use to have a quick appraisal of key pages on your website so you can make them run faster.

Here's one such report from Yslow:

C, well not bad but not best practice either.

Here are the recommendations made by the tool where we didn't score an A:
  • Use a content delivery network to speed up delivery of content to people in other places: our server is located in Melbourne primarily for a Melbourne audience so I'm happy to ignore that one.
  • Add expires headers: You can select information to expire in a certain duration which means that a subsequent visitor won't reload that content unless it has expired. This seems a sensible suggestion.
  • Compress components with gzip: It is suggesting I actually compress key files so that less data needs to be transferred so pages can be loaded more quickly. It also increases the burden on the recipient browser. I'm not about to rush out and do this but I might investigate it.
  • Configure Etags: This is about identifying to a recipient that part of a page hasn't changed since they last browsed by giving it a unique ID. I think this sounds like an overkill for a site like ours.
There is also a whole lot of statistics it generates as well as tools you can use to reduce the size of your files - removing whitespaces like carriage returns and spaces, and using lossy compression on images.

Google's Page Speed is another tool which at first glance seems to perform the same function:



There are many other best practice hints and tips these tools generate. You should carefully consider which you wish to implement and in what priority order. Some will definitely increase page speed and others may take you unnecessary time and heartache.

Summary

There are definitely benefits of providing a faster site for your users and the web in general. Consider for example the cumulative effect of these improvements if everyone implemented bandwidth and speed saving techniques on their websites: we'd have a faster web, people would be able to download more before hitting their limits and people on slow connections will have a better experience. Well worth striving for I say!

People who read this post also read :



No comments:

Post a Comment