Chapter 1. AJAX Essentials

In This Chapter

  • Understanding AJAX

  • Using JavaScript to manage HTTP requests

  • Creating an XMLHttpRequest object

  • Building a synchronous AJAX request

  • Retrieving data from an AJAX request

  • Managing asynchronous AJAX requests

If you've been following the Web trends, you've no doubt heard of AJAX. This technology has generated a lot of interest. Depending on who you listen to, it's either going to change the Internet or it's a lot of overblown hype. In this chapter, I show you what AJAX really is, how to use it, and how to use a particular AJAX library to supercharge your Web pages.

The first thing is to figure out exactly what AJAX is and what it isn't. It isn't:

  • A programming language: It isn't one more language to learn along with the many others you encounter.

  • New: Most of the technology used in AJAX isn't really all that new; it's the way the technology is being used that's different.

  • Remarkably different: For the most part, AJAX is about the same things you'll see in the rest of this book: building compliant Web pages that interact with the user.

So you have to be wondering why people are so excited about AJAX. It's a relatively simple thing, but it has the potential to change the way people think about Internet development. Here's what it really is:

  • Direct control of client-server communication: Rather than the automatic communication between client and server that happens with Web forms and server-side programs, AJAX is about managing this relationship more directly. ...

Get HTML, XHTML, & CSS All-in-One For Dummies®, 2nd Edition 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.