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.

You don’t have to try any AJAX code yet — get a grip on the JavaScript itself first with your assignment there.

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.

Additional AJAX References