Posted on 18/04/2007. By Pete Otaqui.
Nicolas Faugout has a very neat, and tiny, method for creating an XHR object in different browsers :
if (!XMLHttpRequest) { window.XMLHttpRequest = function() { return new ActiveXObject('Microsoft.XMLHTTP'); } } // .... var xhr = new XMLHttpRequest();
Via Ajaxian