aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2013-11-14 16:10:43 -0500
committerDave Methvin <dave.methvin@gmail.com>2013-11-14 16:10:54 -0500
commit9ca87af44c7c606e124ee4d2110cecf5d1ea5f5a (patch)
tree45c6bd37522b7514de3dc7ec601534c79671ec33
parent473c7db79e7e59aafdcc29e8c83cdd064c5df8e7 (diff)
downloadjquery-9ca87af44c7c606e124ee4d2110cecf5d1ea5f5a.tar.gz
jquery-9ca87af44c7c606e124ee4d2110cecf5d1ea5f5a.zip
Fix #14475. Use IE11-friendly detect for proper XHR object.
We don't seem to have test cases for local file access.
-rw-r--r--src/ajax/xhr.js10
1 files 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();
} :