Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

What Is AJAX?

AJAX stands for Asynchronous JavaScript And XML. Let’s break down that name. The first word, Asynchronous, may sound a bit daunting at first, but it’s the whole key to what makes AJAX special.

Asynchronous?

Most web pages are programmed to require communication in a send/receive/display series. The user presses a button on a web app, the page sends the required information to the server, the server sends back some response, and the app displays a new page with that response on it. Back and forth it goes, until the user is finished with the app. Each time the user interacts with the app, the page is refreshed completely. This is, for some, the very definition of annoying.

Asynchronous transfer refers to the idea that we can break this chain down into simply send/receive/display/send/receive/send/receive, and so on, instead of including the display portion in each successive round. In other words, we can send and receive data without ever loading a new page. An asynchronous call is simply a request that we make to the web server through this alternate method. For an example of this, we only need to visit Google’s search engine on our phone. We start with a blank search page, as in Figure 12–1.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint