When IE6 & IE7 serve from the cache in async mode, resolves the request asynchronously. Fixes #11778.

This commit is contained in:
jaubourg 2012-05-16 23:43:16 +02:00
parent 9efe4d03df
commit d55a764e6e

View File

@ -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 ) {