Easy learning with example program codes

difference between ajax synchronous and asynchronous

Let’s see the open method signature first.

open(method,url,async,user,psw): It specifies the request.

method: the request type GET or POST
url: the file location
async: true (asynchronous) or false (synchronous)
user: optional user name
psw: optional password

Synchronous: We can send one request at one time and have to wait for the response before send the second request. i.e. It blocks the client browser until operation completes.

For Synchronous request set the async parameter to false.

Example:"GET", "test.txt", false);

Asynchronous: We can send other request before getting the response of first request. i.e. It does not blocks the client browser.

For Asynchronous request set the async parameter to true.

Example:"GET", "test.txt", true);
Posted in Ajax   

Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki