Monday, February 13th, 2006

Alternate Ajax Techniques, Part 1

Category: Ajax, JavaScript

On, there’s part one of their latest series, “Alternate Ajax Techniques”, a look some other, more complex uses for our beloved XMLHttpRequest object.

By now, nearly everyone who works in web development has heard of the term Ajax, which is simply a term to describe client-server communication achieved without reloading the current page. Most articles on Ajax have focused on using XMLHttp as the means to achieving such communication, but Ajax techniques aren’t limited to just XMLHttp. There are several other methods; we’ll explore some of the more common ones in this series of articles.

In this part of the series, the focus is on dynamic script loading – a method that allows you to pull in Javascript code with an Ajax connection and write it out to the DOM structure of the page, making it simple for you to load Javascript modules only as needed. They provide the example code, both simple and a more complex versions, and finish it off with an explaination of some of the drawbacks for this method of dyanmic loading.

Posted by Chris Cornutt at 8:44 am

3.9 rating from 26 votes


Comments feed TrackBack URI

I don’t know if “more complex” is the correct way to put it. The script loading seems simpler to me…

Comment by John-David Dalton — February 13, 2006

Doesn’t it slow down the user experience?

Comment by Tinus — February 13, 2006

It should actually speed up the user experience, since the initial page will load faster without the full javascript library loaded automatically. It does mean that if you have the ‘on-demand’ scripts tested for and loaded with onclick that the first such click will be a bit slower.

Comment by Mike Ritchie — February 13, 2006


Comment by Jason Bunting — February 13, 2006

I don’t this this technique is new :( .
I’ve seen this technique for long time ago (they use script or hidden frame) .

Comment by quocbao — February 14, 2006

Leave a comment

You must be logged in to post a comment.