mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Try to use XMLHttpRequest in more cases in IE 7. Thanks to Matt Kruse and Sam Collett for the suggestions. Fixes #3623, #2849, #5338, and #5529.
This commit is contained in:
parent
25ee9cee26
commit
b2289f3ec1
@ -175,12 +175,13 @@ jQuery.extend({
|
||||
traditional: false,
|
||||
*/
|
||||
// Create the request object; Microsoft failed to properly
|
||||
// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
|
||||
// implement the XMLHttpRequest in IE7 (can't request local files),
|
||||
// so we use the ActiveXObject when it is available
|
||||
// This function can be overriden by calling jQuery.ajaxSetup
|
||||
xhr: function() {
|
||||
return window.ActiveXObject ?
|
||||
new ActiveXObject("Microsoft.XMLHTTP") :
|
||||
new XMLHttpRequest();
|
||||
return window.XMLHttpRequest && window.location.protocol !== "file:" || window.ActiveXObject ?
|
||||
new window.XMLHttpRequest() :
|
||||
new window.ActiveXObject("Microsoft.XMLHTTP");
|
||||
},
|
||||
accepts: {
|
||||
xml: "application/xml, text/xml",
|
||||
|
Loading…
Reference in New Issue
Block a user