Módulo 15 de 23 · Diagrama de flujo
AJAX Calls
AJAX Calls
AJAX was introduced back in 2005, and it stands for Asynchronous JavaScript And XML.
In reality when we refer to AJAX calls, we mean the communication between a client and the server that takes place asynchronously (at the background).
Normally the client-server model requires a client to make a request from a server in order to send or receive some data from it. This operation could take more than 1-2 seconds, and if we do it synchronously, then we will pause the execution of our page until the response comes back. Luckily by making AJAX calls the whole request-response happens on the background (the user many times doesn't even notice) asynchronously.
That means that when the response comes back from the server, the whole page doesn't need to be reloaded as before. Thus we update only a small portion of the page, without refreshing everything.