How AJAX works?

The XMLHttpRequest object is how AJAX talks to the server. Let\’s look at the picture below to try to figure out how ajax works or how it flows.

how Ajax works and how it flows

\"How

From the above example, you can see that the XMLHttpRequest object is very important.

The user sends a request from the UI, and XMLHttpRequest gets a call from JavaScript.
XMLHttpRequest object sends HTTP Request to the server.
Server uses JSP, PHP, Servlet, ASP.net, etc. to talk to the database.
The data is gotten.
The server sends the XMLHttpRequest callback function either XML data or JSON data.
Data in HTML and CSS is shown on the browser.

Related Article
AJAX & PHP

10 Powerful and Interactive AJAX & PHP Techniques to Build Fast Web Apps AJAX & PHP together enable developers to Read more

PHP AJAX Introduction Tutorial

PHP – AJAX Introduction Complete Beginner Tutorial Modern websites are expected to be fast, interactive, and dynamic. Reloading the entire Read more

AJAX and MySQL with PHP – Dynamic Database Operations Tutorial

AJAX and MySQL – PHP Complete Beginner Tutorial Combining AJAX, PHP, and MySQL allows you to build fast, interactive, and Read more

AJAX XMLHttpRequest

Getting to know XMLHttpRequest Properties of XMLHttpRequest XMLHttpRequest Methods of XMLHttpRequest An object of XMLHttpRequest is used for communication between Read more

What is AJAX

Describe AJAX. AJAX = JavaScript and XML that run in parallel. AJAX is a way to make web pages that Read more

Synchronous vs Asynchronous – AJAX

The difference between synchronous and asynchronous Let\'s learn about the classic web application model and the ajax web application model Read more

AJAX Technologies

AJAX Technologies As was already said, ajax is not a single technology but a group of technologies that work together. Read more

PHP Example – AJAX and XML Tutorial

PHP Example – AJAX and XML Complete Tutorial Before JSON became popular, XML was the most commonly used format for Read more