Skip to Main Content
JavaScript & jQuery: The Missing Manual, 2nd Edition
book

JavaScript & jQuery: The Missing Manual, 2nd Edition

by David Sawyer McFarland
October 2011
Intermediate to advanced content levelIntermediate to advanced
535 pages
18h 20m
English
O'Reilly Media, Inc.
Content preview from JavaScript & jQuery: The Missing Manual, 2nd Edition

Chapter 11. Introducing Ajax

JavaScript is great, but it can’t do everything. If you want to display information from a database, dash off an email with results from a form, or just download additional HTML, you need to communicate with a web server. For these tasks, you usually need to load a new web page. For example, when you search a database for information, you usually leave the search page and go to another page of results.

Of course, waiting for new pages to load takes time. And, if you think about it, the concept of a page disappearing and then reappearing is pretty strange in general. Imagine if you were using Microsoft Word and every time you opened a new file the program’s menus, panels, and windows suddenly disappeared and then reappeared when the new file opened. Sites like Facebook, Twitter, Google Maps, and Gmail are blurring the line between websites and desktop computer programs. If anything, people want websites to feel faster and more responsive, like their desktop programs. The technology that makes this new generation of web applications possible is a programming technology called Ajax.

Ajax lets a web page ask for and receive a response from a web server and then update itself without ever having to load a new web page. The result is a website that feels more responsive. When you visit Google Maps, for example (see Figure 11-1), you can zoom into the map; move north, south, east, or west, and even grab the map and drag it around. All of these actions happen ...

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.
Start your free trial

You might also like

JavaScript & jQuery: The Missing Manual, 3rd Edition

JavaScript & jQuery: The Missing Manual, 3rd Edition

David Sawyer McFarland
JavaScript: The Missing Manual

JavaScript: The Missing Manual

David Sawyer McFarland
JavaScript: Best Practice

JavaScript: Best Practice

James Kolce, Moritz Kroger, Ivan Curic, Samier Saeed, Jeff Mott, M. David Green, Craig Buckler

Publisher Resources

ISBN: 9781449317812Supplemental ContentErrata Page