Want to Test Your Website?

Learn how to increase visitor action, reduce site confusion for new visitors, and get those new visitors returning back for more! Get BWI's Usability and Design Analysis.

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

By Robert Campbell on Wednesday, December 9th, 2009 Print This Post
Previous: Minimizing Round Trip Times – RTT
Next: Suggested Methods to Improve Browser Rendering

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!

Get usability and design tips

Like this post? Get usability and design tips delivered by email straight to you. Full feed articles are delivered, and are managed by Google's Feedburner service.

3 Comments - Post Yours Bookmark and Share

Get a detailed anaylysis of your website: BWI's Web Usability and Design Analysis

Just Posted! Give that Acronym a Title

Related

Category: Code, Graphic Design, Server Side, Usability & Design Tags: , , , , , ,

3 Comments on “Speed Up that Website – Reduce File Size and Limit Cookie Size”

  1. 113Tidbits says:

    Really enjoy all of the timely and informative tips found on your site. Any ideas on what I can do to help my own site? Your advice will go a long way.

    Follow me: @tonyknuckles

  2. oes tsetnoc says:

    hmm its really made your site performance good as well at google webmaster tools

  3. Hi,Without knowing what browser you are using, I can’t speak to what you may be experiencing, since different browsers handle cookies differently.

Leave a Comment

Subscribe without commenting

Return to top of page