aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'src/ajax')
-rw-r--r--src/ajax/xhr.js10
1 files 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 ) {