When the user searches for something, it generates a request to the server for that particular data to view the page. If the user interacts with the web page, It requests a server for more data related to the page. The server refreshes the web page To show the requested data. Refreshing the page constantly is not a healthy option for the server.
AJAX allows communication between user and server constantly without reloading.
Application on the web can constantly exchange data without interfering with the webpage’s resources.
If any process works independently without interfering with other functions then it is an asynchronous process. It runs without loading the page again. Also, the “XMLHttpRequest” object allows scripts to perform AJAX requests.
What is used in AJAX?
HTML, CSS, Document Object Model, XML, XMLHttpRequest Object
Where AJAX is used in WordPress?
- It is used in the post edit screen where you can add a new category while writing a post without reloading the page
- It is used in the comments page where you can approve or delete a comment without reloading the page.