Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2007
    Location
    italy
    Posts
    94
    Thanks
    1
    Thanked 1 Time in 1 Post

    IE response really slow

    Hi all, i'm working on an AJAX project that, when i use FF, is really fast, while when using IE is really slow.
    these are my connection parameters: can you tell me if i can optimize them in any way, or if i'm doing something wrong? Thanks

    Code:
    /*	AJAX	*/
    var http_request = false;
    
    function makePOSTRequest(url, parameters) {
    	http_request = false;
    
    	if (window.XMLHttpRequest) { // Mozilla, Safari,...
    		http_request = new XMLHttpRequest();
    		if (http_request.overrideMimeType) {
    			// set type accordingly to anticipated content type
    			//http_request.overrideMimeType('text/xml');
    			http_request.overrideMimeType('text/html');
    		}
    	} else if (window.ActiveXObject) { // IE
    		try {
    			http_request = new ActiveXObject("Msxml2.XMLHTTP");
    		} catch (e) {
    			try {
    			   http_request = new ActiveXObject("Microsoft.XMLHTTP");
    			} catch (e) {}
    		}
    	}
    
    	if (!http_request) {
    		alert('Cannot create XMLHTTP instance');
    		return false;
    	}
    
    	http_request.open('POST', url, true);
    	http_request.onreadystatechange = alertContents;
    	http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    	http_request.setRequestHeader("Content-length", parameters.length);
    	http_request.setRequestHeader("Connection", "close");
    	http_request.send(parameters);
    	return false;
    }

  • #2
    New to the CF scene
    Join Date
    Jul 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    The only 2 officially supported progids are MSXML2.XMLHTTP.3.0 and MSXML2.XMLHTTP.6.0 (although I fall back to Microsoft.XMLHTTP if the other two aren't available) - Using the right version of msxml

    You might want to try that first... let me know.

    Cheers,
    WF


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •