While loading Javascript from an external sources and hand embedding the script tags I came across the browser’s behaviour when they are asked to load a .js file. Studying the famous Steve Souder’s book “Even faster websites” I came across some of the main concepts on how browsers load stuff up and the optimizations. Although modern browsers are improving at a great deal but we should never forget the X-factor of quick loading websites.
I still remember I used to hate the GMAIL pre-loading. With my experience of designing I have learned that users usually call a system fast which loads and responds quickly, not the ones with a loading bars! Loading bars are the old “Flash” fashion now. Take an example if I only want to check out a list of my mails (In case I am expecting somebodies mail), guess what? You have to see that loading bar every time you cleaned browser’s cache! Should I make that html layout default with no scripts? Well don’t you ever do that! Because your message Compose will loose its cool WYSIWYG editor and that auto-completion email address feature with a long list of what elses. The whole point of story is that there is no place for me to stand between the coolness and quickness.
The same factor of doing deffered loading was exploited by Microsoft in claiming there operating system to be fast in XP version. However doing a deffered loads on javascripts has its own disadvantages, one of them is network traffic. The more you boil the fundamental parts and components of your javascripts, the more requests you have to make in order to load them and the network traffic goes up accordingly. So while making a design choice it is extremely important for a programmer to make a good choice between the amount of loadable code chunks and the number of loadable code chunks. Please remember that loadable code chunks here are referred as a .js files. So the number of loadable files and the size of loadable files are the most important factor and are totally up to a programmer.
So are there any outlines for a programmer to do that? Well there are lots of efforts out there, most of frameworks like dojo and YUI are providing there loaders. Steve souders is one of the guys going around and making programmers aware that only backend optimization is not the whole story. As closing I would recomend every so called “Web 2.0 developer” to have a look at lazy loads and convince himself that when and why they are important?
Design by Simon Fletcher. Powered by Tumblr.
© Copyright 2010