Web users often abandon websites that are slow and take more than a few seconds to load. An Akamai survey says that four seconds is the maximum length of time an average online shopper will wait for a Web page to load before potentially abandoning a retail site.Need for speed - While the "4 second" threshold was derived for online shopping websites, it still suggests that "fast websites" are very essential to getting traffic and retaining them.
Related: How to Completely Test Your Website
As bloggers and website owners, there are several ways in which we can reduce the average page loading time and give a better experience to our site visitors.
Let's look at some of more popular tricks for making faster webpages:
1. Move all HTML code present inside <style> tags to an external CSS file. Styles embedded in webpages make them bulky while the CSS file is downloaded just once on the client computer.
2. Say no to Macromedia Flash Movies or embedded quicktime objects that autoplay when the page is loaded. Youtube videos, that start only when the Play button is pressed, are not an issue here.
3. If your pages have lot of Javascript code, move all the code to a separate external file that would load just once.
4. Split pages with lengthy content into smaller pages. Even search engine robots would love you for this.
5. Large pictures should be avoided on webpages. But if you can't do without them, slice them into smaller pictures.
6. Just say no to bells-n-whistles like Blog Chats, Google Gadgets, Weather forecast widgets, etc. They don't add value to your site and increase the page loading time.
7. A simple height and width attribute to your img tag can significantly improve the image rendering time as the browser gets an hint about the image size even before downloading it locally.
8. Compress your web graphics using any of the free image editing software like Irfanview. A jpeg image with 60% quality compression is good enough for the web.
9. Manually clean up your HTML - if you have done the blog template inside Macromedia Dreamweaver or Microsoft Frontpage, they would have add some extra HTML tags and other information which you probably don't need in the finished version. Open the template in Notepad and delete the additional commentary mercilessly.
10. Stay away from HTML tables especially nested tables. They just confuse the web browser and increase the page rendering time. Use CSS layers instead.
Related: Why is Your Website Slow ?
Bonus Tip: If you are loading images from different web servers [like the RSS subscription buttons you see on this site], this could affect your webpage downloading speed when one of the external site is slow to respond or their server goes down. It's therefore advisable to put all images on just one server.
Related: Get your pictures on Google Images - via.
Find this article at: http://labnol.blogspot.com/2006/11/you-have-4-seconds-ten-tricks-that.html
web: http://www.labnol.org/ email: amit@labnol.org

Reader Comments
Here is an interesting discussion about optimising page load times on Slashdot. Links to an interesting discussion with Google Engineer - Aaron Hopkins
http://slashdot.org/article.pl?sid=06/10/30/0329258
Written on 13/11/06 9:03 PM
Cool Tips,
I saved in a file for reference.
Rajeev
www.tekno-world.blogspot.com
Written on 13/11/06 9:40 PM
What about having your image files download from multiple urls? I've heard that browsers have a limit for simulatious image downloads from a site, and one way around this is to spread your images onto various subdomains.
Truth? Urban Legand?
Written on 14/11/06 10:06 AM
Most browsers are configured to only have 2 simultaneous HTTP connections to the same server. Hosting images on a different subdomain can speed up the loading time because the browser is allowed to make more requests in parallel.
Obviously this benefits high bandwidth connections more than dialup.
Written on 14/11/06 12:57 PM
I have written some tips related to this on my blog..
It might help some people.
Thanks Deep.
Written on 14/11/06 5:48 PM
Nice pointers ..
WRT point num 8 i would suggest using a free software called http://www.xemico.com/photogadget/freeware.html
The best part about this sw is you just select the pics fomr ur windows explorer, right click and resize ... far more less clicks than irfanview/acdcee.
Works best with newbies/mom-dads
Written on 15/11/06 4:24 AM
Nice Tips for web pages loading speed.
The tips totally awesome and helpful.
Written on 16/11/06 4:53 AM
Awesome, I gonna tried it, but I am really sad to hear that I must get rid of my chat function in my blog.
Written on 23/7/07 1:48 PM
This is valuable. I had an animated GIF that was taking up way too much bandwidth. I've now replaced it with a much smaller jpeg.
Written on 17/9/07 9:17 PM