Improve page loading time

October 22, 2010 § Leave a comment

Now a days the speed of internet is growing like the price of gold in India. Up to 16Mbps is getting for homely use only. So a normal user expects the website he wish to browse to be loaded in less than 2 seconds. If takes more than 3 seconds he will saus “hmm”, then if we pass 5”seconds” then it will be “aarg” and beyond that “damn it, I don’t want to waste my time by browsing this dead slow website” at the end losses the visitor.

So to compete in this real internet world we have to give high quality products. Is that only ..? No we have the responsibility to save the time of the visitor. Understand the fact that every one is busy, so consider the tight schedule of the end user and give appropriate solution.

In this topic I am trying to cover some points which can improve the page loading time of a website.

The points mentioned below are a just a light in the darkness, you have to find your pin.

Below are some basic things you have to consider while developing HTML:

  1. W3C validation
  2. Try to load only one js file and one css file
  3. Compress css and JS file
  4. Try to avoid including of js files inside the body part
  5. Avoid complex nesting of tables
  6. Try to follow div layout ( avoid tables )
  7. Reduce the size of html files ( the one which we will see in view source )
  8. Use CSS sprites
  9. Reduce the number of requests send to the server to load DOM items
  10. Reduce image quality to a medium level, do not use HD videos or Multiple HQ images to load in same page

Things you have to consider while developing Server Side :

  1. Try to reduce the number of database queries.
  2. Analyse the flow of a particular page. Identify which data needed to be taken from the DB. Try for the possibility of writing a single join query to retrieve all the data. If it is no way possible then create multiple queries.
  3. Optimize database
  4. Increase the usage of SQL Views ( If a page with complex join query have frequent hits on it, convert it to view )
  5. Try SQL Caching
  6. Enable content caching through your server side script
  7. If you have multiple unavoidable imaged needed to be loaded, use CDN ( content delivery network ).
  8. Make sure you are DRY in code ( Do not Repeat Yourself )
  9. Try to follow a templating system ( small application) or framework ( medium – large application)
  10. Use Gzip Compression
Advertisements

Tagged: , ,

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

What’s this?

You are currently reading Improve page loading time at ARP's Web Blog.

meta

%d bloggers like this: