what is the technical difference b/w xmlHttpRequest object and activeX Object of ajax [closed]
Please give me answer of this question as early as possible
ActiveX in general is a Windows feature. Old versions of IE supported the ability to use ActiveX controls inside the browser. However no other browser (or operating system) supports this feature.
The ActiveX Ajax object was a Microsoft-supplied ActiveX control, which was available to be used in early versions of IE. Again, it only worked in IE.
More recently, the web standards body came up with a similar feature which didn't require an ActiveX control. This is the XMLHttpRequest object. This is now supported by all browsers, including newer versions of IE.
In order to write Ajax code which supports all browsers in current use, you need to write it in a way that supports either of these technologies, because many people are still using the older versions of IE that support ActiveX but don't support the standard XMLHttpRequest object.
Where possible, your code should use the XMLHttpRequest object, and only fall back to the old-style ActiveX control as a last resort. In some cases (where you don't need to support older versions of IE) you can drop the ActiveX control entirely.
ActiveX as a technology in the browser is generally frowned upon as these days, as it has been the cause of many security issues, and breaks cross-browser compatibility. The Ajax control is just about the only ActiveX control still in common use.
Have a look here and here. That should answer your question. Besides it's always recommended to use XMLHttpRequest.
精彩评论