>
 





In my previous article 7 Easy-to-Apply Tips to Improve Your Web Site Performance, I described methods to achieve better client-side performance.  The conclusion of the article was: “The most important and effective way to improve web site performance is to make fewer HTTP Requests.”

Since browsers only are able to download two components on parallel per hostname, and every HTTP request has an average round-trip latency of 0.2 seconds, that causes a 2 second latency alone, if the site is loading 20 items, regardless of whether they are style sheets, images or scripts. (On an average broadband connection with a browser capable of downloading two components at a time).

Since browsers spend approximately 80% of the time fetching external components such as scripts, style sheets and images. Reducing the number of HTTP requests has the biggest impact on improving website performance. Moreover, it is the easiest way to make a performance improvement.

This article focuses on ways of minimizing HTTP Requests to maximize web site performance.

1. Image Maps


Image Maps are used to combine multiple images into a single image and specify regions to assign a specific action to each region. The overall size is about the same, but reducing the number of HTTP requests speeds up the page.

There are two types of image maps:

    Client-side: When a user activates a region of a client-side image map with a mouse, the pixel coordinates are interpreted by the user agent. The user agent selects a link that was specified for the activated region and follows it.

    Server-side:
When a user activates a region of a server-side image map with a mouse, the pixel coordinates of the click are sent to the server-side agent specified by the href attribute of the A element. The server-side agent interprets the coordinates and performs some action.

Client-side image maps are preferred over server-side image maps for at least two reasons: they are accessible to people browsing with non-graphical user agents and they offer immediate feedback as to whether or not the pointer is over an active region.

For details: Image Maps

The main navigation of bloggingdeveloper.com utilizes image maps. If you examine the source of this page, you will see the following code:

<img src="/themes/BD/images/menuimg.gif" border="0"
        usemap="#Map" id="imgMenu" />
<map name="Map" id="Map">
  <area shape="rect"
        coords="4,31,82,58"
        href="/"
        alt="Blogging Developer Home" />
  <area shape="rect"
        coords="88,25,189,57"
        href="/archive.aspx"
        alt="Archive" />
  <area shape="rect"
        coords="197,26,307,53"
        href="/contact.aspx"
        alt="Contact Blogging Developer" />
  <area shape="rect"
        coords="315,25,379,52"
        href="/syndication.axd?format=rss"
        alt="Blogging Developer RSS Feed" />
</map>

2. CSS Sprites


Another method for reducing the number of image requests is combining images into a single image and using CSS background-image and background-position properties to display the desired image part.

You may find detailed information about CSS sprites in CSS Sprites: Image Slicing’s Kiss of Death.

Bloggingdeveloper.com utilizes CSS Sprites on the rating stars.

3. Combine External Script/StyleSheet Files into a Single File


Number of HTTP requests may be reduced by combining all scripts into a single script and similarly combining all external stylesheets into a single stylesheet.

While combining external files reduces the HTTP requests, it hardens the maintenance of these files. However, combining these files as a part of build process is a good practice. Moreover, if you have variety of pages that use a different set of scripts and stylesheets, you should not combine them into a one big file which is inefficient since the page downloads more JS and CSS than it needs.

Conclusions:


If you want to improve your site’s performance, reducing the number of HTTP requests in your page is the first place to start. This is the most important guideline for improving performance.

Want automatic updates? Subscribe to our RSS feed or
Get Email Updates sent directly to your inbox!

Currently rated 3.5 by 19 people

  • Currently 3.526315/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Comments

September 15. 2009 16:38

Minimera dina CSS-filer

Minimera dina CSS-filer

CRS Webbproduktion | Reply

October 3. 2009 20:03

Great blog, thanks for the CSS method really helped


Bob

Ceiling fan | Reply

October 27. 2009 14:24

I just hope to have understood this the way it was meant

cash loans | Reply

November 3. 2009 00:43

This is good that they have broken the whole procedure into easy steps..I was looking something like this for my work too the information is really help full and very useful.
thanks

Network Virtualization | Reply

November 4. 2009 13:02

I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commentators here!

green tea diets | Reply

November 4. 2009 13:57

Never knew that. Thanks for the info. I think your blog is going to do well. People will always return to read this kind of content.Great job.

wedding invitations | Reply

November 4. 2009 14:59

I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.Thanks for sharing this information about Goa in the Monsoon I really enjoy reading on it.

wine tasting clubs | Reply

November 4. 2009 15:22

Useful information shared..Iam very happy to read this article..thanks for giving us nice info.Fantastic walk-through. I appreciate this post.

green tea health | Reply

November 4. 2009 16:02

Useful information shared..Iam very happy to read this article..thanks for giving us nice info.Fantastic walk-through. I appreciate this post.

green tea health | Reply

November 4. 2009 16:02

Useful information shared..Iam very happy to read this article..thanks for giving us nice info.Fantastic walk-through. I appreciate this post.

green tea health | Reply

November 5. 2009 07:16

Never knew that. Thanks for the info. I think your blog is going to do well. People will always return to read this kind of content.Great job.

wedding invitation | Reply

November 27. 2009 09:26

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful and be.

Online dating | Reply

December 7. 2009 08:12

Identify five major differences between http get and http post methods of making a request to server?

SEO | Reply

December 16. 2009 09:03

they have broken the whole procedure into easy steps..I was looking something like this for my work too the information is really help full and very useful.
thanks

back surgery | Reply

December 18. 2009 21:21

These are some excellent tips. I would have never thought of half of these.

prescription drugs   | Reply

February 23. 2010 10:45

great!

monicabelluci | Reply

March 15. 2010 14:53

You cannot be really first-rate at your work if your work is all you are.

cash advance | Reply

Add comment




(Will not be displayed!)