How to optimize the performance of a website.

3 Sep

Performance of a web page play a key role in conversion rate of your website. A fast website gets more user automatically. I decided to write on how to make the web pages loads faster.

Optimise performance of website

Optimize performance of website

If your answers is yes then, there are some of golden rule to be followed to make your site loads faster. They are as below:-

Rule 1: Make Fewer HTTP Requests

HTML take 10-20% time only however 80-90% of time spent in making HTTP requests for all the components (images, scripts, stylesheets, Flash, etc.) referenced in the HTML document. Using techniques as below, we can reduces response times of the pages by as much as 50%

  • Image Maps
  • CSS Sprites
  • Inline Images
  • Combined Scripts and Stylesheets

Rule 2: Use a Content Delivery Network
Content Delivery Networks (CDN) is a large distributed system of servers.The goal of a CDN is to serve content to end-users with high availability and high performance.

Rule 3: Add an Expires Header
A web server uses the Expires header in the HTTP response to tell the client how long a component can be cached.In Apace ExpiresDefault is set to 10 year.

Some useful techniques are as below:-

  • Expires Header
  • Max-Age and mod_expires
  • Empty Cache vs. Primed Cache
  • More Than Just Images
  • Revving Filenames

Rule 4: Gzip Components
Compression is a simple, effective way to save bandwidth and speed up your site. Smaller the file, faster it will loads.If you are using Apache, see how it work
Rule 5: Put Stylesheets at the Top
Put all your stylesheets at the top and remove unused content.
Rule 6: Put Scripts at the Bottom
Put script at bottom as anything below the script is blocked from rendering and downloading until after the script is loaded.
Rule 7: Make JavaScript and CSS External
Use external javascript and css as much as possible.

Rule 9: Reduce DNS Lookups
The Domain Name System (DNS) maps hostnames to IP addresses, just as phonebooks map people’s names to their phone numbers.DNS lookups add delays to the initial requests to a host. Making requests to a large number of different hosts can hurt performance.

Rule 10: Minify JavaScript
Always minify your javascript or css. There are various online tools available.(http://minify.avivo.si/#results)

Rule 11: Avoid Redirects
Redirects increase the load time as it has to look up two different address. Try to avoid redirects.

Rule 12: Remove Duplicate Scripts
Duplicacy in code normally happens but it can hurt your performance. So try to remove duplicacy in the code.

This article is based on Steve’s book High Performance Web Sites, published by O’Reilly.]

Advertisements

One Response to “How to optimize the performance of a website.”

  1. paras demi tarjous September 13, 2013 at 6:48 am #

    Keep on writing, great job!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: