views:

17

answers:

1

I hope both the object invocations are referring to the ActiveXObject. But why are we passing two different parameters to work in IE. 1. Msxml2.XMLHTTP and 2. Microsoft.XMLHTTP

Are they both same ? Or Are they browser dependent(IE7 and IE8) ?

I used both. I did not get any exception. Both are looking same for me. I am using IE 8.

+2  A: 

Both are actually outdated. There are various versions of Microsoft's venerable MSXML ActiveX object (I believe the last one was version 5.0 and came with some version of Office.) The versions have minor differences in behavior, and bug fixes that usually don't come into play in AJAX scenarios.

Starting with IE7, Microsoft supported the standardized "XmlHttpRequest" object that other modern browsers had adopted. See http://msdn.microsoft.com/en-us/library/ms537505(VS.85).aspx. You should definitely be using that as IE7 is now the de-facto lowest common denominator. IE6 has been declared dead by most major organizations, so there's no reason to support the old Microsoft-specific ActiveX ProgIDs.

And of course, there is very little reason these days to roll your own AJAX calls, as libraries like jQuery and ASP.NET Ajax do it for you, abstracting away these obscure browser quirks. I would strongly suggest learning one of those libraries.

Jordan Rieger

Jordan Rieger