Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Try to cancel all jQuery AJAX requests currently running
$.xhrPool = [];
$.xhrPool.abortAll = function() {
$.xhrPool.forEach(function(jqXHR) {
$.rails.ajax = function(options){
var req = $.ajax(options);
return req;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment