From d55a764e6e3a5980fb9633df1303418bcb512327 Mon Sep 17 00:00:00 2001 From: jaubourg Date: Wed, 16 May 2012 23:43:16 +0200 Subject: [PATCH] When IE6 & IE7 serve from the cache in async mode, resolves the request asynchronously. Fixes #11778. --- src/ajax/xhr.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index 013863d4e..186432f61 100644 --- a/src/ajax/xhr.js +++ b/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 ) { -- 2.39.5