JQuery Ajax


Ajax is a technique for sending data from a server to a web browser without having to reload the entire tab.

The JavaScript-based XMLHttpRequest object is used by Ajax to asynchronously send and receive data to and from a web server in the background without interfering with the user's experience.

Ajax has grown in popularity to the point where it's difficult to find an application that doesn't use it in some way. Gmail, Google Maps, Google Docs, YouTube, Facebook, Flickr, and other large-scale Ajax-driven online applications are examples.


Ajax with jQuery


Since different browsers implement Ajax in different ways, if you use the standard JavaScript approach to implement Ajax, you'll have to write different code for each browser to ensure that Ajax works cross-browser.

However, jQuery makes the task of implementing Ajax easier by taking care of browser variations. It provides easy methods for implementing Ajax that operate across all browsers, such as load(), $.get(), $.post(), and so on.

In the next chapters, you'll learn how to use jQuery Ajax to load data from the server and send and receive data using the HTTP GET and POST methods.