Chapter 1. Ajax 101

<feature><title>In This Chapter</title> <objective>

Introducing how Ajax works


Seeing Ajax at work in live searches, chat, shopping carts, and more


We aren’t getting enough orders on our Web site,” storms the CEO. “People just don’t like clicking all those buttons and waiting for a new page all the time. It’s too distracting.”

“How about a simpler solution?” you ask. “What if people could stay on the same page and just drag the items they want to buy to a shopping cart? No page refreshes, no fuss, no muss.”

“You mean people wouldn’t have to navigate from page to page to add items to a shopping cart and then check out? Customers could do everything on a single Web page?”

“Yep,” you say. “And that page would automatically let our software on the server know what items the customer had purchased — all without having to reload the Web page.”

“I love it!” the CEO says. “What’s it called?”

“Ajax,” you say.

Welcome to the world of Ajax, the technology that lets Web software act like desktop software. One of the biggest problems with traditional Web applications is that they have that “Web” feel — you have to keep clicking buttons to move from page to page, and watch the screen flicker as your browser loads a new Web page.

Ajax is here to take care of that issue, because it enables you grab data from the server without reloading new pages into the browser.

How Does Ajax Work?

With Ajax, Web applications finally start feeling like desktop ...

Get Ajax For Dummies® now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.