- It is a technique that allows web pages to load or update their data asynchronously by exchanging it with the web servers.
- By asynchronous, we mean to say that different parts of a page can be updated without reloading the entire page.
- AJAX can include many formats such as XML, pre-formatted HTML, plain text and JSON.

The following happens in the traditional web model:
- It is a technique that allows web pages to load or update their data asynchronously by exchanging it with the web servers.
- By asynchronous, we mean to say that different parts of a page can be updated without reloading the entire page.
- AJAX can include many formats such as XML, pre-formatted HTML, plain text and JSON.
It is easy to understand the drawbacks of the traditional web model. They are as follows:
- The code execution is blocked by the HTTP request.
- The complete web page is re-rendered irrespective of the request.
Now let’s understand how the AJAX web model works from the following image:

The following happens in the AJAX web model:
- The AJAX method makes an HTTP request to the server.
- Since AJAX requests are non-blocking in nature, the code execution continues while the data exchange happens in the background.
- The server only returns the relevant response to the AJAX request as a response. This response can be of any format (JSON/XML/Text).
- When the AJAX request has been completed, the callback function is initiated for the same.
- Instead of reloading the entire web page, only the relevant components are rendered by the callback function.
Now, we can understand how the AJAX web model is a much better approach than the traditional web model.
The main features of AJAX are as follows:
- It exchanges data with the server behind the scenes.
- It updates the web page without reloading the whole page.