To best describe how AJAX works, it is helpful to first look at how ‘normal’ web applications work. When a user clicks on a non-AJAX link, the result is usually a request to the server for a page (i.e. a chunk of HTML and script code) that replaces the current page. When navigating to a completely different page this is appropriate. However, when a page just needs to update a small part of its content, reloading the whole page is overkill. This is why for example just changing a value in a drop-down list can result in the all-too-familiar delay as the browser goes to the server, clears out the current page and reloads that same page with just a few items changed.
Enter AJAX. When a user clicks on an AJAX link or control, a different type of request is made on the server. This type of request uses a special JavaScript command that does not result in the page being reloaded. An AJAX request happens behind the scenes or more technically – asynchronously. The information sent back from the server is not an entire page, but instead is usually XML that contains just the information that has changed on the page.
The Ajax engine works within the Web browser (through JavaScript and the DOM) to render the Web application and handle any requests that the customer might have of the Web server. The beauty of it is that because the Ajax engine is handling the requests, it can hold most information in the engine itself, while allowing the interaction with the application and the customer to happen asynchronously and independently of any interaction with the server.