JavaScript and XML combine to make asynchronous updating happen through the use of something called an XMLHttpRequest object. When a user visits a web page designed to make use of AJAX and a prescribed event occurs (the user loads the page, clicks a button, fills out a form, etc.)
JavaScript creates an XMLHttpRequest object, which then transfers data in an XML format between a web browser (the program being used to view the website) and a web server (the software or hardware where a website’s data is stored).
The XMLHttpRequest object sends a request for updated page data to the web server, the server process the request, a response is created server-side and sent back to the browser, which then uses JavaScript to process the response and display it on the screen as updated content.
To recap: JavaScript automates the updating process, the request for updated content is formatted in XML to make it universally understandable, and JavaScript again kicks in to refresh the relevant content for the user viewing the page.
Cascarano notes that the AJAX technique ignores extraneous page data and only handles requests for updated information and the updated information itself. This is really the heart of AJAX’s effectiveness, making websites and applications that use AJAX faster and more responsive for users.