From 9ca87af44c7c606e124ee4d2110cecf5d1ea5f5a Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Thu, 14 Nov 2013 16:10:43 -0500 Subject: [PATCH] Fix #14475. Use IE11-friendly detect for proper XHR object. We don't seem to have test cases for local file access. --- src/ajax/xhr.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index 927fb88d0..fe24b6751 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -6,13 +6,9 @@ define([ // Create the request object // (This is still attached to ajaxSettings for backward compatibility) -jQuery.ajaxSettings.xhr = window.ActiveXObject ? - /* Microsoft failed to properly - * implement the XMLHttpRequest in IE7 (can't request local files), - * so we use the ActiveXObject when it is available - * Additionally XMLHttpRequest can be disabled in IE7/IE8 so - * we need a fallback. - */ +jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ? + // Support: IE6+ + // XHR cannot access local files, always use ActiveX for that case function() { return !this.isLocal && createStandardXHR() || createActiveXHR(); } :