When building Ajax websites, speed is a very important factor. Most of the Ajax-based websites are loading quite slowly, and this can be annoying sometimes.
But why are these websites loading so slowly?
The main reason is that for the website to function correctly, all the Ajax application logic must be loaded into the client. And sometimes, we're talking about a lot of JavaScript code...
On the other hand, we have the degradability concept that says that a website should function correctly even if JavaScript is disabled.
Well... ok, so the website will function if JavaScript is disabled, then again it will wait for the whole Ajax logic to load before actually functioning. This does not really make sense...
Moving one step further, I realized that if a website would degrade while the Ajax functionalities are loading, then you would get both speed and Ajax.
What does this mean: When you access an Ajax-based site, the site loads very fast, and all the functionalities are available for you (the Ajax part of the site is not yet loaded). Then, if you click on a link, it would degrade and the whole page would reload. In the meanwhile, the required JavaScript files are asynchronously loaded from the server, and once everything is loaded and we're ready to go, Ajax comes into action and the site is automagically transforming into an Ajax website.
So, using this technique you would get the speed of a "classic" website (and here I mean the 1st page loading time), and the power of Ajax.
Does this make sense?
We've just updated our Ajax integration demos (http://mail.interaktonline.com/demos/ajax_integration2/) using this technique and it seems to work. Even on a dial-up connection, after a few clicks, the JavaScript is loaded in the client and the site is 100% Ajax.
And one more thing: If you are interested in the MX Ajax Toolbox, just let us know: http://www.interaktonline.com/demos/ajax/?Content__state=Register
Bogdan
|