Chapter 14. Ajax
Ajax is a new term for a relatively old technique. Ajax is an acronym coined by Jesse James Garrett of Adaptive Path, standing for A synchronous JavaScript And XML. Although it is an acronym, people tend to use it without capitalizing each letter.
The core idea behind Ajax is the use of JavaScript within the browser to transfer and process XML from the server. The asynchronous refers to the fact that this transfer occurs on a background thread, allowing the client to continue to interact with the Web page. Asynchronous download, combined with the fact that only relatively small amounts of XML are transferred, reduces the need for round tripping the entire browser page. This creates a Web application that seems more performant.
This chapter will look at Ajax, and how to add it to your applications. It looks at the main components of any Ajax solution—JavaScript and the XMLHttpRequest
object. While not a complete reference on either, the chapter provides basic information on these two topics. In addition, several popular Ajax libraries are highlighted.
The history of Ajax begins around the time of Internet Explorer 5.0, when the XMLHttpRequest
object (Microsoft.XMLHTTP) was added to the objects accessible from client-side script.
JavaScript is a scripting language created by Netscape to provide dynamic functionality in Navigator. Originally, it was called LiveScript, but it was later renamed to associate it with Java, which was becoming popular at the time. JavaScript ...
Get Professional XML now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.