Making your site faster with Yslow and pagespeed

google is now using the speed of your site to determine your search rankings your site needs to be as fast as it can. Along with optimising your site for search results and w3c and wcag validation you now need to optimise for speed using google pagespeed.

there are a lot of good tools out there to help you:

yahoo Yslow plugin for firefox is excellent

google pagespeed is excellent too

once you install them in your firefox then you visit your site and analyse it using the above tools, it will list a lot of things that you have to do to make your site run faster – things like using gzip compression, minifying css and javascript, serving javascript from the bottom of your page (which allows the rest of the page to load first, making your site appear to load faster), using browser caching and turning off etags =)

there is lots and lots of information about these things on the net, but ill quickly go over some of the things that will make the most difference:

Etags

Expires Headers

put the following into your .htaccess –


# 480 weeks
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=3456000, public"
</FilesMatch>
<FilesMatch "\.(js|css)$">
Header set Cache-Control "max-age=3456000, private"
</FilesMatch>
FileETag none

this will set the expires headers on images, pdf and flash video to 480 weeks and javascript and css to 480 weeks and avoid a bug in some proxy caching servers =) it will set the Etags to be off for everything. this will mean that the first time people visit your site they will download all the images etc and store them in their bowser cache meaning that the next time they visit the site will be a lot faster!

try to make sure your images are optimised too – pagespeed will tell you if your images are optimised and will allow you to save the optimised version if your images are not the best! it also does this for javascript and css too =)

I think the most important thing to consider is compression. it will speed up your page loading times by an order of magnitude. combined with all the other improvements that the Yslow and pagespeed plugins will tell you about it should make for your site to be as fast as it can be!

this, like the seo optimising and the validation is an ongoing process, but the more you do it the better your site becomes and the less that will go wrong with it =)

This Post Has 2 Comments

  1. Jacko

    Out of interest, is it confirmed that Google are using page load time as a factor in rankings or is that speculation due to their Google labs page rank?

    If so, not only are people going to want individual IPs in different class C’s but also server sat right next to Google?!

    jacko

Leave a Reply