The questions:
.done()
& success:
Well there is no advantage of doing that in that particular situation.
The point of the .done()
.fail()
.always()
methods is that you can
$.ajax
If you are at the $.ajax
call site only attaching single handlers then those advantages don't really come into play.
So you can return the promise and others may attach their own handlers.
Example is refreshing plugins after ajax request:
$.ajaxPrefilter(function(opt, origOpt, jqxhr) {
jqxhr.always(function() {
$("[data-plugin]").plugin();
});
});