πŸŽ‰ New: Top 75 PHP Interview Questions for 2026 β€” Free for all learners

How AJAX works?

P
php Guru
Β· Β· 1 min read Β·

πŸ“Œ Key Takeaways

  • 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.

P
php Guru
PHP Developer & Technical Writer β€” phponline.in A seasoned PHP developer with 8+ years of experience in Laravel, MySQL, and REST APIs. Writes practical tutorials and career guides to help developers grow their skills and income. All salary data is researched from real job postings and developer surveys.
← Previous Post
AJAX Technologies
Next Post β†’
CSS Tutorial