I have an app where I click a button and the app 15 AJAX POST requests (all asynchronously).
I want to refresh after ALL post requests are done. Is there a way I can detect/confirm that all AJAX requests are complete THEN have the page refresh?
After some research, I found potential one way is to place the .ajaxStop
method in one of the ajax success conditions:
success: function(data, status) {
$(document).ajaxStop(function() {location.reload(true); });
},
Can someone confirm if this is accurate?
Thanks in advance!