Client Side

All the fancy frizz

Speeding up your site a few quick wins

Written by: Peter Fisher on October 21, 2012
Tagged under: ,
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Web Page Speed MattersThe client side is often over looked when monitoring and increasing the speed of a site. Think of how many HTTP requests your pages are calling. Can these be reduced in some way? A In this post I briefly cover a few a few quick wins.

Use image sprites for common icons

This is a big image file which contains multiple images. The images are displayed on the page using background positioning. The down fall here is that the images cannot have alternative text as they are handled in the CSS so it’s best to use these for common icons and layout images. The advantage of using image sprites is that it reduces the number of HTTP requests to just one.

Bunch up JavaScript and CSS files

How many CSS and JavaScript files are you requesting per page load. Could you cut and paste all your CSS into one file and thus reducing the amount of HTTP Requests.

Minify the CSS and JavaScript

You many leave  tabbed spaces, comments and big gaps in your files when developing but all these wasted bytes aren’t going to help the speed in a production environment. When your happy with your files try minifing them and see how small you can make them

Only use one JavaScript library

I see so many sites using both jQuery and Protoype where only one library is sufficient. These libraries can be fairly large so keep to one.

Consider using a secondary webserver

You could use lighthttpd or another apache web-server for your client sided files. This will remove the pressure from your PHP server

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Peter Fisher is a web developer working in Gloucester UK. Founder of the digital agency Websomatic, author of this blog and the HowToCodeWell Youtube channel. Peter has over ten years of web development experience under his belt

Read all about Peter Fisher

Leave a Reply

Your email address will not be published. Required fields are marked *