Friday, July 28th, 2006

IE7 XMLHttpRequest – Native or Not?

Category: IE, XmlHttpRequest

<>p>MS announced this week that IE7 will be pushed as a high-priority update, so we can expect it to be popular pretty quickly. Reader Shawn Lauriat brought our attention to the question: How native is IE7′s XMLHttpRequest?

The IE team have promoted the new IE7 as including native XMLHttpRequest. This is the case, insofar as you can instantiate an XHR using new XMLHttpRequest(). More importantly than the syntax, XHR will still work when ActiveX has been disabled (unlike IE6 and below).

On the other hand, Shawn notes that some issues exist. Some have pointed out that its more of a native facade than a native Javascript object. Specifically:

  • xhr.prototype fails. Indeed, it’s reported that any dynamic member creation fails (e.g. xhr.callId = 25; an idiom that can be useful for Call Tracking). If this is still the case, it’s not the behavior of a native object and it’s not consistent with other browsers.
  • It’s also worth pointing out that IE has an option to disable native XHR. (Aside: can we switch to positive terminology already – “enable” rather than “disable” … it’s hardly a secret of HCI that options should be stated in the positive :-/). The XHR option is, reasonably enough, motivated by security. Although it sounds like XHR will default to enabled (sorry, “not disabled”), it’s still a reality that some users will be continue to be lost if you rely on XHR. Don’t throw out that IFrame just yet!

IE7 XHR – Native or Not?

Related Content:

Posted by Michael Mahemoff at 2:42 pm
19 Comments

++++-
4.1 rating from 51 votes

19 Comments »

Comments feed TrackBack URI

I definitely wouldn’t say to keep or start using iframes, but I do think people should keep in mind that if MS says “native support” they don’t actually mean “native” as in a “native JavaScript” object.

Comment by Shawn — July 28, 2006

Using IFrames to get around the user’s choice of disabling XHR is a bad idea, anyways.

Comment by Rad S. — July 28, 2006

All of MSIE’s “native” objects are crippled in the same way.

Comment by Jef Poskanzer — July 29, 2006

This sound a bit like their “native” support for transparent PNG:s that fails in the same way as IE 6 when combined with the opacity filter….

Comment by José Jeria — July 29, 2006

Sounds just as ‘native’ as the read-only TBODY shizzle.

In short: This proves that they did just a couple of quick hacks to make it look like it works, but it doesn’t because it’s not STRUCTURALLY correct.

This kind of represents my current view of IE7:
IE7 = (IE4 + hacks^2) + (IE5 + hacks^2) + (IE6 + hacks^2) + (loadOfNewHacks^2) – SomeOutDatedCrap

Prepare yourself for a shitload of new problems…

Comment by SchizoDuckie — July 31, 2006

Oh yeah don’t forget the “SomeShitWheStoleFromFireFox” part of the equasion…

Comment by SchizoDuckie — July 31, 2006

[...] Parece ser que por narices vamos a tener IE7 en nuestros PC’s, pero es que además el objeto XMLHTTPRequest parece no ser el nativo…. si es que hacen lo que les da la gana… [...]

Pingback by aNieto2K - » Microsoft sigo haciendo de las suyas, ahora con IE7 — July 31, 2006

You know, I wouldn’t even care if they just stole everything from Firefox. But they have to wait for years, finally steal it, break it, and then put it in a release while pretending they came up with it on their own.

If they would just steal it outright, we would at least have something closer to consistency and ease of development.

Comment by The Hater — July 31, 2006

¿XMLHttpRequest nativo en IE7 o no?

Uno de los anuncios que más esperamos del nuevo IE7 es que el objeto XMLHttpRequest (XHR) iba a ser nativo y no será necesario el uso de ActiveX. Tan solo es necesario crear una nueva instancia de este objeto new…

Trackback by Sentido Web — August 1, 2006

Who Wants to Develop Web Apps on Microsoft

Ajaxian asks whether IE7 XHR is native, well, sort of. After being case-blind throughout its existence, Microsoft finally gives up on case-blindness and makes IE7 XmlHttpRequest case-sensitive….

Trackback by Hasan's Blog — August 1, 2006

[...] Michael Mahemoff at Ajaxian addresses the issue of native XMLHttpRequest support in IE 7. The IE 7 team has repeatedly stated, with relative fanfare, that the new browser will include native XMLHttpRequest. But, as Michael points out, the question remains: just how native is this native XMLHttpRequest [...]

Pingback by Javascript Blog » Blog Archive » XMLHttpRequest in IE 7 — October 22, 2006

[...] Michael Mahemoff at Ajaxian addresses the issue of native XMLHttpRequest support in IE 7 Your comments will be moderated but will appear as soon as humanly possible. [...]

Pingback by Javascript Blog Automk.com » Blog Archive » XMLHttpRequest in IE 7 — November 3, 2006

Looking forvard for a great and interesting discussion on this topic. Keep it up!

Comment by Yan — December 18, 2006

if i run my project in IE7 i am getting following error

System.MissingMethodException.

any help?
thanks in advance.

Comment by Rahul — February 5, 2007

hi i am running my asp.net ajax application in windows 2003 server with iis6 but everything is working fine in all the browsers but i am getting following error in Internet Explorer 7….

MissingMethodException: Method not found

any help?.

thanks in advance.

Yoganand

Comment by Rahul — February 13, 2007

IE7 has a nice little feature that disables posting silently to iframes (using client side scripting) too – so you probably wouldn’t even find the error for weeks. Iframes aren’t a solution. Kicking Bill Gates squarely in the knackers should be considered.

Comment by Kev — April 12, 2007

Hai friends i have done a site in AJAX.It works well except IE7.
Even in IE 7 onload i am calling a file through ajax its working well.But if i fire another event in ajax ,its not functioning.Ajax request is sent to server successfully.But response is not coming from server.Any one help me please? advance thanks!

Comment by Siva — May 4, 2007

Nothing can be as good as Fire Fox at least I never loose my connection like IE7 has been doing me. It’s frustrating but I know the anwer is near. I hope!

Comment by Rocky Pacley — October 20, 2007

I never had problems in FireFox, but IE is unpredictable.

Comment by Snowcore — December 12, 2007

Leave a comment

You must be logged in to post a comment.