MSXML6 is supposed to have the best security, performance, reliability, and W3C conformance (Using the right version of MSXML in Internet Explorer).
Questions:
- Why does not jQuery use MSXML6?
- Does jQuery use MSXML3? (I think the answer is yes, see my update below...)
- Can i fetch the version of MSXML from an
IXMLDOMDocument
instance? If so, how?
Update:
I've made some research based on Deviant's answer:
jQuery creates the IXMLHTTPRequest
object, which was first released with MSXML 2.0, like this:
new ActiveXObject("Microsoft.XMLHTTP");
Microsoft.XMLHTTP
is a ProgID, which is only implemented in MSXML3 for legacy support and not remended. If i understand the reference correctly this would have created a version 2.x IXMLHTTPRequest
object, before those versions was “kill-bitted”. Now I'm pretty sure this ProgID creates an MSXML 3.0 IXMLHTTPRequest
object. This may answer my second question.
Here is sample code that shows how to create the two remended versions of the IXMLHTTPRequest
object:
new ActiveXObject("MSXML2.XMLHTTP.3.0"); // MSXML 3.0 ProgID...
new ActiveXObject("MSXML2.XMLHTTP.6.0"); // MSXML 6.0 ProgID...
I've tested XSLT performance in MSXML3 vs MSXML6. MSXML6 used less than 1/10 of the time to do the same transformation as MSXML3 for a pretty large XML file!
Rerences:
- jQuery: The Write Less, Do More, JavaScript Library
IXMLHTTPRequest
- MSXML API History
- GUID and ProgID Information
- Using the right version of MSXML in Internet Explorer
- MSXML 3.0 GUIDs and ProgIDs
- MSXML 6.0 GUIDs and ProgIDs
- Why Version-Independent GUIDs and ProgIDs Were Removed
MSXML6 is supposed to have the best security, performance, reliability, and W3C conformance (Using the right version of MSXML in Internet Explorer).
Questions:
- Why does not jQuery use MSXML6?
- Does jQuery use MSXML3? (I think the answer is yes, see my update below...)
- Can i fetch the version of MSXML from an
IXMLDOMDocument
instance? If so, how?
Update:
I've made some research based on Deviant's answer:
jQuery creates the IXMLHTTPRequest
object, which was first released with MSXML 2.0, like this:
new ActiveXObject("Microsoft.XMLHTTP");
Microsoft.XMLHTTP
is a ProgID, which is only implemented in MSXML3 for legacy support and not remended. If i understand the reference correctly this would have created a version 2.x IXMLHTTPRequest
object, before those versions was “kill-bitted”. Now I'm pretty sure this ProgID creates an MSXML 3.0 IXMLHTTPRequest
object. This may answer my second question.
Here is sample code that shows how to create the two remended versions of the IXMLHTTPRequest
object:
new ActiveXObject("MSXML2.XMLHTTP.3.0"); // MSXML 3.0 ProgID...
new ActiveXObject("MSXML2.XMLHTTP.6.0"); // MSXML 6.0 ProgID...
I've tested XSLT performance in MSXML3 vs MSXML6. MSXML6 used less than 1/10 of the time to do the same transformation as MSXML3 for a pretty large XML file!
Rerences:
- jQuery: The Write Less, Do More, JavaScript Library
IXMLHTTPRequest
- MSXML API History
- GUID and ProgID Information
- Using the right version of MSXML in Internet Explorer
- MSXML 3.0 GUIDs and ProgIDs
- MSXML 6.0 GUIDs and ProgIDs
- Why Version-Independent GUIDs and ProgIDs Were Removed
1 Answer
Reset to default 7jQuery does. Source:
// Create the request object; Microsoft failed to properly
// implement the XMLHttpRequest in IE7, 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();
},
But it obviously can't use MSXML in Firefox/chrome/safari/opera etc. So if you attempt to use MSXML in your html your site will only work in IE. So I do not remend you do that.
jQuery only uses MSXML as a backup to get around the bugs in MS's implementation of XmlHttpRequest.
I wouldn't say that MSXML is the most conformant to the XMLHttpRequest standard. MSXML existed long before XMLHttpRequest did so it's an odd parison. http://www.w3/TR/XMLHttpRequest/
jQuery used to support XML and XPath selectors but that has been deprecated. There are plugins for jQuery and XML http://plugins.jquery./search/node/xml+type:project_project
JSON is usually preferred over XML. http://json