AJAX on IE - back to the IFRAME
On Internet Explorer in order to write AJAX based web applications you have to use an ActiveX object.
var request = new ActiveXObject("Microsoft.XMLHTTP");
On browsers that support the XMLHttpRequest object (Safari, Firefox) you instantiate your asynchronous http object as follows:
var request = new XMLHttpRequest();
Most AJAX apps have a browser check to determine which one to use.
Kae Verens recently pointed out in a blog entry that web sites that use AJAX won't work on IE when ActiveX controls are disabled in the security settings.
This is an important point to ponder when considering AJAX for a web application. Lots of companies will have ActiveX controls disabled, and keep in mind that IE is still the most popular web browser.
So how do you fix this? Back to using hidden
I have actually looked around for some discussion on IFRAMEs vs XMLHttpRequest (aka AJAX), but haven't found much. There are a few nice features of the XMLHttpRequest object, those mostly deal with access to headers, status codes, and other http details. Which is nice but you don't always need that info.
Are there any other advantages to using XMLHttpRequest objects over IFRAMEs?
Like this? Follow me ↯Tweet Follow @pfreitag
AJAX on IE - back to the IFRAME was first published on August 17, 2005.
- Ajax Same Origin Policy No More with Firefox 3.5
- Firefox Now Supports HttpOnly Cookies
- AJAX Presentation Outline
- Sessions don't work in Chrome but do in IE
- Cross Domain Data Theft using CSS
- jQuery UI Sortable Tutorial
- Firefox 3.5 Introduces Origin Header, Security Features
- Geolocation API for Adobe AIR?