jQuery Tutorial
jQuery Introduction jQuery Getting Started jQuery Syntax jQuery Selectors jQuery Events
jQuery Effects
jQuery Hide/Show jQuery Fade jQuery Slide jQuery Animation jQuery stop() jQuery Callback jQuery Chaining
jQuery Manipulation
jQuery Get/Set jQuery Add jQuery Remove jQuery CSS Classes jQuery css() jQuery Dimensions
jQuery Traversing
jQuery Traversing jQuery Ancestors jQuery Descendants jQuery Siblings jQuery Filtering
jQuery AJAX
jQuery AJAX Intro jQuery Load jQuery Get/Post jQuery AJAX Events
jQuery Misc
jQuery noConflict() jQuery Filters
jQuery References
jQuery Reference jQuery Selectors jQuery Events jQuery Effects jQuery HTML/CSS jQuery Traversing jQuery AJAX jQuery Miscellaneous jQuery Properties

jQuery - AJAX Introduction

AJAX allows web pages to be updated "asynchronously" by exchanging data with a web server behind the scenes.

This means that it is possible to update parts of a web page, without reloading the whole page.

Using AJAX we can:

  • Send data to a web server (in the background)
  • Read data from a web server (after the page has loaded)
  • Update a web page without reloading the page

AJAX Example

The following code shows a basic example of jQuery AJAX:

jQuery AJAX will change this text

Run code

What is AJAX?

AJAX stands for Asynchronous JavaScript And XML.

AJAX is not a programming language, it's a technique for accessing web servers from a web page.

AJAX allow you to make requests to the server without reloading the page.

AJAX can communicate with the server, exchange data, and update the page without having to refresh the page.

AJAX can send and receive information in various formats, including JSON, XML, HTML, and text files.

In a nutshell, it is the use of the XMLHttpRequest object to communicate with servers.

The two major features of AJAX allow you to do the following:

  • Make requests to the server without reloading the page
  • Receive and work with data from the server

You can learn more about AJAX in our AJAX tutorial.


Ajax with jQuery

Different browsers implement the Ajax differently that means if you're adopting the typical JavaScript way to implement the Ajax you have to write the different code for different browsers to ensure that Ajax would work cross-browser.

But, fortunately jQuery simplifies the process of implementing Ajax by taking care of those browser differences.

jQuery offers simple methods to implement the Ajax that works seamlessly across all the browsers.

In the next chapters we will look at the most important jQuery AJAX methods.


jQuery AJAX Reference

For a complete AJAX methods reference, visit our jQuery AJAX Reference.