Professional XML
by Thiru Thangarathinam, Bill Evjen, Alessandro Vernet, Sam Ferguson, Kent Sharkey, Michael Kay
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access