Skip to content

Commit

Permalink
When IE6 & IE7 serve from the cache in async mode, resolves the reque…
Browse files Browse the repository at this point in the history
…st asynchronously. Fixes #11778.
  • Loading branch information
jaubourg committed May 16, 2012
1 parent 9efe4d0 commit d55a764
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ajax/xhr.js
Expand Up @@ -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 ) {
Expand Down

0 comments on commit d55a764

Please sign in to comment.