Speed Up that Website – Reduce File Size and Limit Cookie Size

After my last post about minimizing RTT’s you may have a bit of a headache, and feel it’s not worth the trouble to make your site load any faster. Well this post lists some easy methods suggested by Google to speed up your website, and you may have already tried a few of them.

Uploading

Got a fast internet connection? Most people do nowadays, that is, for downloading. For uploading though, that bandwidth speed you or your users may have, is probably less than a fifth of the download speed. When a user visits a website, it’s not a one way trip.

When a visitor lands on your site, they first send you data. They do this because your server needs to know what to deliver, and to whom. If the user additionally has a cookie from your site in their cache, they will most likely be sending that data as well.

Well, there is a condition that occurs on many networks limiting the packet size to just 1,500 bytes. Big cookie, plus a 500 or so byte header means extra work for the user, the network, and your server. The basic lesson from this is to keep your cookies streamlined and small. Limit cookie size by only storing the most essential data.

Reducing Size

It’s now time to reduce and crunch everything.

  • With images, reduce the number of colors, and compress
  • For images use JPG, PNG, and GIF if the image is less than 100 square pixels – Avoid TIFF and BMP
  • Remove unused CSS styles – This will help the file load faster because it is smaller is size, and since there is less for the browser to decipher, it can render the the page faster as well. A double win here!
  • Reduce the size of your HTML, CSS, and javascript by removing extra remarks, line breaks, and spaces
  • and don’t forget to keep the cookies small!

Squeeze and reduce. If you search the web you may also be able to find a few scripts or programs that can help you do some of these.

Just Plain Bad Form

This tip isn’t so much about crunching files, but crunching unnecessary downloading and caching. I say it’s bad form because not only does it waste bandwidth, it reveals poor planning in site design. In preparation of my own self defense, I claim the “I was tired plea”, and was just being lazy. You are bound to find it occurring on one of my sites. So here is the condition, and hopefully not too many of you are suffering from this.

Imagine you have created a template to use throughout your site. You use this template in your main root folder, and several sub folders as well. You test the site, and notice the logo is missing from all of the pages that are located in the sub folders. This happened because in the template, you referenced the logo as if it were in the same directory. The easy fix? Copy and past the logo into all of the folders. Now it works.

The problem with that, is now visitors¬† have to download your logo over and over again as they navigate through your site. That is just plain bad form, a pain for your users (whether they know it or not), and could be partially to blame for your high bounce rate. The lesson here? Don’t duplicate content on your site.

Next post will be how to optimize for browser rendering to get that site flying!

7 Comments

Add a Comment

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