aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2013-10-28 17:40:13 -0400
committerRichard Gibson <richard.gibson@gmail.com>2013-10-28 17:53:31 -0400
commitf9d41ac641dcb5a93ba8a9027476b160d8f41111 (patch)
tree4f6956ac38e4e84a77310b276f3769c45283fb8c /src/ajax
parentebabb33411171ff5a6eb707e541b8d6646f35328 (diff)
downloadjquery-f9d41ac641dcb5a93ba8a9027476b160d8f41111.tar.gz
jquery-f9d41ac641dcb5a93ba8a9027476b160d8f41111.zip
Fix #14379: AJAX requests on unload
Diffstat (limited to 'src/ajax')
-rw-r--r--src/ajax/xhr.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js
index 8e6696b0d..5dbfc646f 100644
--- a/src/ajax/xhr.js
+++ b/src/ajax/xhr.js
@@ -18,18 +18,16 @@ var xhrSupported = jQuery.ajaxSettings.xhr(),
// #1450: sometimes IE returns 1223 when it should be 204
1223: 204
},
- // Support: IE9
- // We need to keep track of outbound xhr and abort them manually
- // because IE is not smart enough to do it all by itself
xhrId = 0,
xhrCallbacks = {};
+// Support: IE9
+// Open requests must be manually aborted on unload (#5280)
if ( window.ActiveXObject ) {
jQuery( window ).on( "unload", function() {
for ( var key in xhrCallbacks ) {
xhrCallbacks[ key ]();
}
- xhrCallbacks = undefined;
});
}