Bug Tracker

Modify

Ticket #1619 (closed enhancement: wontfix)

Opened 6 years ago

Last modified 5 years ago

Update XMLHttpRequest generation code

Reported by: raziel Owned by:
Priority: minor Milestone: 1.2.2
Component: ajax Version: 1.2.1
Keywords: XMLHttpRequest ActiveX MSXML Cc:
Blocking: Blocked by:

Description

The code that creates the XMLHttpREquest, inside the ajax function, should handle different versions of the MSXML ActiveX object. Right now the library uses Microsoft.XMLHTTP which is an old ProdID, just maintained for backwards compatibility.

Then, we should rearrange them to comply with Microsoft's intended use for each one of those version. A greater version number doesn't necessarily mean the most up to date functionality (weird , I know), and moreover, doesn't mean it's the version we should use to generate an XMLHttpRequest object.

According to  http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx

Microsoft's preffered version for "web-intended" usage is MSXML2.XMLHTTP.6.0. No surprises there, since it's the latest version. However, the next recommended fall back is not v.5 nor v.4 but v.3.

Now, about the version independent ProdID: MSXML2.XMLHTTP, it's equivalent to MSXML2.XMLHTTP.3.0, given that is the preferred fall back version.

The Microsoft namespace: Microsoft.XMLHTTP is just implemented for legacy support, and only in MSXML v.3.

Whether we should keep the lookup for v.4 and v.5 depends on if we want to at least fall back to something even though it's not designed explicitly to support the web context, or we rather throw an error. I'd rather keep them, and maybe log a warning?

Having said all that, I think there should be an array and iterate over it to generate the XMLHttpRequest instance from the best possible ActiveX.

JSONRpcClient.msxmlNames = [ "MSXML2.XMLHTTP.6.0",

"MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "Microsoft.XMLHTTP" ]; /* this last one could be here or after the version independent id, for efficiency, depending on how true is the claim this is only available in V3 */

Change History

comment:1 Changed 6 years ago by raziel

Sorry for the JSONRpcClient reference. I was working on patching that library and copy pasted the code.

comment:2 Changed 5 years ago by john

  • Status changed from new to closed
  • Resolution set to wontfix
  • Version changed from 1.2 to 1.2.1
  • Component changed from core to ajax
  • Milestone changed from 1.2.1 to 1.2.2

We discussed this with a member of the IE team and they agreed that our current technique is best. There's no reason to use multiple versions of the ActiveX controls as they provide no additional benefit (and, if anything, just introduce new bugs).

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.