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?
- Ajax Same Origin Policy No More with Firefox 3.5 - June 30, 2009
- Firefox Now Supports HttpOnly Cookies - July 19, 2007
- AJAX Presentation Outline - December 13, 2005
- Cross Domain Data Theft using CSS - July 21, 2010
- jQuery UI Sortable Tutorial - January 7, 2010
- Upcoming CFML Conferences in April 2017
- CFSummit 2016 Slides
- Securing Legacy CFML - dev.Objective() 2016 Slides
- My CFSummit 2015 Slide Decks
- Adding Chrome Custom Search for CFDocs
- Disable Flash Remoting on ColdFusion Servers
- HackMyCF Adds SSL/TLS Scanner
- IncompatibleClassChangeError after ColdFusion 11 Update 5