When you use “regular old” HTML(link), you’re forced to present your page in just a few seconds. If it’s not there, the browser will time-out and you will wind up with a “500 Error,” your user might try again, but for the most part, you’ve lost your audience. However, when you use AJAX (Asynchronous Javascript And XML), you can lay out the main structure of your page, and then refresh each element individually; each element of the page then gets to time out seperately. Ajax proponents call this a ‘good thing’ because it helps the user experience your page as being interactive.
It can cause some Ajaxy sites to become slow, and having multiple Ajaxy sites (google calendar, flickr, etc) open in multiple windows can tax your bandwidth and your processor while you’re loading up all those pieces. I think this is a misuse of Ajax, because you’re not really helping the user, you’re clogging up their bandwidth. It also provides some bad examples of programming.
For instance, one programmer I know had to represent a series of fifty items. She created a webpage, and then called an ajax function and populated a list with all 50 items. When a user wanted to get some specific information from the web page, she added that info to the Ajax return, and then used the same ajax to query the database, using Javascript to parse it out differently for the more detailed view. This was easier on her, because she only had to write and test one set of ajax functions and two tests of Javascript functions, but it wound up being harder for the user, because the two queries (’give me a list of 50 items’ and ‘give me detailed info about this one item’ ) returned the same information:a lot of extraneous information was included in both result sets.
The problem is analogous to the reasons for the height and width attributes in image tags (in HTML(link)). If you don’t include the height and width attributes, then the page will continue to display the text; the browser will not know where to position the image. But if you do, then the browser can block off the position of the image, leaving no image actually shown. The page appears to load faster, because the user isn’t watching as parts of the page are laid out and moved around.
Witness, for example, gmail. Google’s search engine website is very fast; pages come back quickly after you push the submit button. But the gmail interface takes a long time to draw, while the Ajax works its magic ‘behind the screen’ and then shows the page.
I think that Ajax has its place in our web browsing world, and I appreciate all the hard work that goes into it- but some people are using it badly- and I think that Ajax is also good at covering those blemishes.