AJAX and Server interaction occurs with the help of the XMLHttpRequest object. Following are the phases demonstrating the entire flow of AJAX.
2. XMLhttpRequest object is created.
3. With the XMLHttpRequest object, the HTTP request is sent to the web server.
4. Server interaction via databases.
5. Data is fetched.
7. Content will be updated and displayed on the browser.