XmlHttpRequest in IE / FireFox
Dflying | 10 March, 2006 21:22The XmlHttpRequest object has been introduced in IE 5.5 silently more than 5 years ago, without the AJAX cheerleading and hype we are seeing today. The technology at this point only allowed an ActiveX approach to the problem. A few years later, folks at the Mozilla camp decided to forget their religious and standards based passion and "borrowed" the technology from Microsoft. Since Gecko browsers do not really like ActiveX (which is a good thing), the guys implemented it as a built-in object. Hence now we are having the IE ActiveX XmlHttpRequest vs. the built-in XmlHttpRequest in FireFox.
And here is the problem - many corporate, government and military organizations take security pretty seriously and do not trust ActiveX. Meaning, if they are using IE 5.5 / 6.0 and have disabled ActiveX, your AJAX based application won’t work for these users. But FireFox will run fine, however migrating corporate desktops just for your application is not an option for them - we are talking about huge conservative organizations here. The solution is to use <iframe> instead of XmlHttpRequest - the <iframe> transport hack has been here for a while and is well known. Sure, it is not as l33t and cool as all the AJAX XmlHttp thing, but may just get the job done. Btw, in IE7 Beta XmlHttpRequest is no longer an ActiveX object, so Microsoft have learnt their lesson (actually they will have to support both the ActiveX and built-in XmlHttpRequest for quite some time - removing things from IE is not a good idea).
The second major difference in XmlHttpRequests - using the ActiveX IE object you can request info from any site/page. XmlHttpRequest in FireFox allows callbacks only to the server hosting the page - no remote callbacks are allowed. So if you plan to deploy an AJAX application targeted for all browsers, take this into account as well.
Posted in
JavaScript & AJAX.
Comment: (3).
Trackbacks:(109).
Permalink
«Next post |
Previous post»
Referers
Comments
-
1. vanillaing | 03/10,2006 at 21:29
请教一个问题:
如何才能把日期显示在我每次发表的文章上?
谢谢!最好尽快能解决。 -
2. Dflying | 03/10,2006 at 21:36
Done
-
3. vanillaing | 03/10,2006 at 22:05
Tks soooooooooo much!




