IE 7 - Native xmlHttpRequest Not So Good
When I found out IE7 was going to implement a native javascript object, xmlHttpRequest, in addition to their own Microsoft.XMLHTTP object, I was thrilled. This meant once IE 6 was phased out of the world, all my ajax stuff wouldn’t need to check browser before proceeding. For the most I use ajax frameworks (http://www.ajaxpro.info/) that already have this built in but I do write my own xmlhttp request on occasion.
For an internal application I have an ajax search functionality built that queries a database and returns customers names on key entry. So I type in “Acm” I get a listing of:
Acmanda
Acmat
Acme
This is very similar to Google suggest, but I display the results in a fixed height div tag with auto scroll enabled. The ajax returns li tags with href tags around the company names. This works on IE 6, FF, and Safari. However in IE7, there is some real slowness to this. When I use Fiddler I see the Request returning from the AJAX calls but the results do not show up. I tried setting the page cache to nothing, but still no luck. I then ran into several articles questioning the XmlHttpRequest javascript object.
- http://ajaxian.com/archives/ie7-xmlhttprequest-native-or-not
- http://blogs.msdn.com/ie/archive/2006/01/23/516393.aspx#518174
I also found out IE 7 is slow on some Google sites where a ton of XML traffic is being returned, like their Google Maps.
I started playing around with IE 7’s options, turning off Phishing filter, testing, no luck and so on. When I turned off the native XMLHttp support as seen below, my application ran perfectly fast on IE7. IE 7 is set up to fall back to the Microsoft.XMLHTTP Active X object if this gets turned off.
So this makes me wonder.
- Did the IE 7 team really implement a native javascript XmlHttpRequest object?
- If so, did they follow the spec?
- If so, is their object code buggy or just plain slow
OR
- Is their native XmlHttpRequest object really a javascript object or did they cut corners and implement an object that acts native but in all reality is a deformed active x object?
- If so, why would you ship with this option turned on by default?
This has egg on the face written all over it.
Did you know you could browse IE with handheld computers? Modern technology makes everything more portable, like barcode readers and mobile computers. Zebra card printers are now portable, too, so you can print on the go!
Written by Tim on October 25th, 2006 with
12 comments.
Read more articles on asp.net and web 2.0 ish.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article
#1. October 25th, 2006, at 8:54 PM.
Without a repro URL, it’s hard to understand where you’re hitting problems.
Internally, the native object still uses MSXML, which is the same base that the older AX object used. Hence, it would be quite surprising to see slower performance on the new object.