Skip to content
Permalink
Browse files

When IE6 & IE7 serve from the cache in async mode, resolves the reque…

…st asynchronously. Fixes #11778.
  • Loading branch information...
jaubourg committed May 16, 2012
1 parent 9efe4d0 commit d55a764e6e3a5980fb9633df1303418bcb512327
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/ajax/xhr.js
@@ -190,11 +190,13 @@ if ( jQuery.support.ajax ) {
}
};

// if we're in sync mode or it's in cache
// and has been retrieved directly (IE6 & IE7)
// we need to manually fire the callback
if ( !s.async || xhr.readyState === 4 ) {
if ( !s.async ) {
// if we're in sync mode we fire the callback
callback();
} else if ( xhr.readyState === 4 ) {
// (IE6 & IE7) if it's in cache and has been
// retrieved directly we need to fire the callback
setTimeout( callback, 0 );
} else {
handle = ++xhrId;
if ( xhrOnUnloadAbort ) {

0 comments on commit d55a764

Please sign in to comment.
You can’t perform that action at this time.