This post discusses a mechanism jQuery.whenAll() for making multiple Ajax calls (or really, any jQuery Deferred calls, since that is what the Ajax object is, and getting a resolution for all calls.

This is an alternative to jQuery's built-in Deferred.when(), which short-circuits on rejected resolutions (for example, jQuery Ajax failures resulting from a 400 or 500 level HTTP status) and will not give you subsequent responses.

So, for example a call such as: jQuery.when(jQuery.get('resource/404', 'resource/200')) will not give you a resolution for both requests, only the resolution of the rejected request (the 404 one).

Therefore, a mechanism like jQuery.whenAll() is very useful for situations when you may want the resolution to all of the requests.

The fiddle: