Return already resolved promise
@Eselk, In my experience, the $.Deferred(function(def) {…}); construction is rarely needed, though I guess it can be quite useful in some circumstances. Firstly, : return $.Deferred(function(def) { def.resolve(); }).promise(); will simplify to : return $.Deferred().resolve().promise(); Secondly, in DataService.makeRequest() you can avoid the need for an explicit $.Deferred by exploiting .then(), as follows : function DataService() … Read more