This is a frequently asked question in JQuery advanced interview questions.   When an ajax request is made, if you want to handle it when the request completes then .always() will come in handy. .always() is a promise callback method added in jQuery 1.6 and it's a replacement for the deprecated .complete() method. For example, if you want to show a loading indicator when a request is made and hide the loading indicator when the request is complete, in this case, .always() handler can be useful. The following is an example: var jqxhr = $.ajax("example.php")
.done(function() {
alert("success");
})
.fail(function() {
alert("error");
})
.always(function() {
alert("complete");
})