Difference Between Synchronous And Asynchronous Javascript

Both Synchronous or Asynchronous AJAX requests involve the same process of making the request and getting the response from the server. The only difference is that in an Asynchronous request the process is handled independently and is not dependent on following processes. So that the script do not wait for the server request to complete before executing the remaining lines of code. As soon as the server response is completed it is sent back to the client, but during the complete round-trip the client is not halted.

However in case of Synchronous AJAX request, the request is sent to the server and the client waits for the server’s response before it executes the script further. So this is the special case when the further script is dependent on the results returned by the server.

Comments

Popular posts from this blog

Difference between var, let and const keyword in JavaScript

Salesforce Record Id

Salesforce External ID