diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2013-10-28 17:40:13 -0400 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-10-28 17:53:31 -0400 |
commit | f9d41ac641dcb5a93ba8a9027476b160d8f41111 (patch) | |
tree | 4f6956ac38e4e84a77310b276f3769c45283fb8c /src/ajax | |
parent | ebabb33411171ff5a6eb707e541b8d6646f35328 (diff) | |
download | jquery-f9d41ac641dcb5a93ba8a9027476b160d8f41111.tar.gz jquery-f9d41ac641dcb5a93ba8a9027476b160d8f41111.zip |
Fix #14379: AJAX requests on unload
Diffstat (limited to 'src/ajax')
-rw-r--r-- | src/ajax/xhr.js | 6 |
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; }); } |