Asynchronous Callbacks with AJAX

A blog post I came across should be of interest to anyone working with AJAX:

I’ve explained before why XmlHttpRequest should always be used asynchronously. In a nutshell, JavaScript is not multi-threaded, so the only way to keep your application and browser reasonably responsive is to use some kind of asynchronous pattern. This way, the multitasking is left to the hosting browser and the JavaScript developer can enjoy a relatively easier programming environment where he only needs to care about events and not about summoning threads and managing locks.

Add this small script to your page (preferably in the <head>
section) and all your XmlHttp requests will be done synchronously no
matter what the framework you’re using is doing. This works with ASP.NET
2.0 callbacks in both IE and Firefox but breaks callbacks for Opera. I
suspect that it would also work with other Ajax frameworks such as Atlas.

Supposedly, this will work with any AJAX framework.  I’ve been running into just this issue with AJAX.Net.  Having used both  AJAX.Net and Atlas somewhat extensively, I’ll have to give the edge to Atlas for pure ease of use.

You may also like...