I am trying to trigger a page reload after bunch of ajax calls have been completed. Following is the code:
var calls = jQuery.map(urls, function(url) {
return $.post(url);
});
$.when(calls)
.done(function() {
window.location.reload();
});
This code is almost always seem to trigger reload before all ajax requests complete and I see in Firebug that some ajax requests are getting cancelled. What am I missing?
Thanks.