Adding AJAX to JavaScript
AJAX (Asynchronous JavaScript And XML) can be described as a real-time web page updating technology. Normally when you are doing client-side processing for a web page and you need to update the web page, your browser has to request a brand-new copy of the entire web page from the web server. That's time- and bandwidth-consuming, of course! With AJAX, your browser can simply send a background request that the web server send only the pieces of the page to be updated, and the browser will then plug in those pieces and redisplay the page.
Much of Google runs via AJAX, including GMail and Google Maps. Photo imaging sites like Flickr are another example of web sites making extensive use of AJAX.
Although we think of AJAX as a JavaScript-specific enhancement, it's actually a technology that can use other scripting languages such as PHP and Ruby. However, we're going to stick with JavaScript-based AJAX for now.
Readings and Assignment
Read the following articles and tutorials on AJAX.
- The article that started it all
- AJAX fundamentals
- When should you use AJAX?
- Rasmus’ 30 second AJAX Tutorial (very quick and dirty overview)
- AJAX:Getting Started (basic tutorial)
- IBM DeveloperWorks AJAX tutorial (a bit more involved)
- Using the XML HTTP Request object
- JavaScript and AJAX security
Note that with both JavaScript and AJAX, the very best thing you can do after going through these tutorials will be to download and study as many code examples as possible. The JavaScript/AJAX Google notebook I shared with you has direct and indirect links to hundreds of these examples, and I'm sure you can find many more on your own.
Additional AJAX References
- AjaxPatterns, fantastic resource spawned from a highly recommended book
- 32 AJAX tutorials for beginners (well, maybe not beginners, but lots of nifty tricks here)
- A set of great examples to study

