Home > Web Performance Optimization > Top 3 Guidelines for Performance

Top 3 Guidelines for Performance

January 30th, 2010 Leave a comment Go to comments

Recently I have been working on performance optimization of a site. There are several guidelines available from Yahoo! and Google. These include techniques from optimization of CSS code to use of CDN, yes the list includes a lot.
What are the top techniques which can benefit any site the most? In this post I will list top 3 techniques and describe them briefly.

The top techniques are

  1. Reduce HTTP Requests
  2. Use browser cache properly
  3. Compress your content with gzip

Reduce HTTP Requests

Reducing the components (images, JS, CSS) on a page reduces the HTTP requests. Popular ways to reduce the components include, using image sprites, image maps, combine multiple CSS and JS files into one.

If you see this page test you will notice that only 11 HTTP requests are made to fully load home page of an eCommerce site, which is very few as compared to similar sites.

One important thing you also need to check if Keep-Alive is on. For most servers its on by default. This allows persistence connections for HTTP requests. Other wise new connection is made for each request.

Use browser cache properly

A first-time visit to a page may require several HTTP requests to load all the components. Using browser cache can avoid unnecessary HTTP requests on next page. Browser cache should be used for all components including images, js, CSS, and Flash etc. This not only reduces number of HTTP requests it also saves a lot of bandwidth for visitor and server.

See the repeat view test result which shows only one request is made rest of components are served from local browser cache.

Cache is utilized by setting proper expiry headers for components. Read my other post Using browser cache image expiry for performance which explains how to set these headers.

Compress your content with Gzip

Compressing HTML, CSS and JS etc reduces response times by reducing the size of data sent. Gzip is the most used and effective compression available. Gzip normally reduces the response size by about 70%. All major browsers support Gzip compression. This saves a lot of bandwidth on client and server end at very small CPU cost. In my post Compress your web pages I have explained gzip in bit more detail.

Categories: Web Performance Optimization Tags: