O'Reilly logo

Professional XML by Michael Kay, Kent Sharkey, Sam Ferguson, Alessandro Vernet, Bill Evjen, Thiru Thangarathinam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required