Asynchronous Methods in AJAX

Making Synchronous AJAX Calls

Asynchronous AJAX calls are used to write a waits for a response before moving on to a next statements.

If a user is using a JQuery then it is easy to use by setting as async:false .

Make Functions Accept Callbacks

A much better solutions is to make your functions accept callbacks and rewrite your code around.

Var result = foo();
foo(function(result) {
// write your code// });

Deferred Objects

These are the times When directly passd=ing a callback is not ideal for any application.
Deferred objects make use of a then() method when your passinga callback so that it will execute when a value becomes available.