AJAX problem: slow response using IE6 on Win2000 versus IE6 on XP

Discussion in 'Javascript' started by Pugi!, Feb 5, 2007.

  1. Pugi!

    Pugi! Guest

    I have an AJAX application.
    Using IE6, FF2.0, FF1.5, IE7 and Opera9 on WinXP the responses are
    very quick. If the server returns an OK message the formù is removed
    from screen. If not (because some required fields have no value, or
    some fields have an invalid value) and error message is displayed
    underneath the field..
    Using FF1.5 and FF2.0 on Win2000 gives quick responses, but using IE6
    on Win2000 there is a delay between alert('send info') and
    alert('response from server') 15 till 20 seconds.
    It is an AJAX-application, so I use a lot of XMLHttpRequests. For an
    AJAX GET I don't notice any difference for the different browser and
    OS combinations, same goes for a SUBMIT POST (where I direct
    output(javascript) to a hidden iframe). The problem with the long
    delay with an AJAX POST only occurs using IE6 on Win2000 . Is this a
    known problem or should use different parameters for my AJAX POST ?

    here I define url and strPos
    ....
    alert('send info');
    http.open('POST', url, true);
    http.setRequestHeader("Content-Type",
    "application/x-www-form-urlencoded; charset=UTF-8");
    http.setRequestHeader("Content-length", strPost.length);
    http.setRequestHeader("Connection", "close");
    http.onreadystatechange = function () {
    if (http.readyState == 4) {
    if(http.status == 200) {
    alert('response from server')
    var dom = http.responseXML;
    var messg = dom.getElementsByTagName('message');
    var target = document.getElementById('folder_' +
    parentFolderID);
    if (messg.length > 0) {
    switch(messg[0].getAttribute('level')) {
    case 'ok':
    closeForm(frmNode);
    refreshFolder(target);
    break;
    case 'warning':
    case 'error':
    closeForm(frmNode);
    alert(messg[0].getAttribute('level') + ' : ' +
    messg[0].getAttribute('text'))
    break;
    case 'notice':

    errTarget.appendChild(document.createTextNode('Error: ' +
    messg[0].getAttribute('text')));
    break;
    }
    }
    }
    }
    }
    http.send(strPost);

    Johan
    Pugi!, Feb 5, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. angel
    Replies:
    11
    Views:
    1,255
    Jeff Epler
    Jul 29, 2004
  2. Replies:
    4
    Views:
    2,654
  3. Paul Butcher
    Replies:
    12
    Views:
    683
    Gary Wright
    Nov 28, 2007
  4. Pugi!
    Replies:
    1
    Views:
    332
    Martin Honnen
    Dec 4, 2006
  5. Replies:
    4
    Views:
    186
    Tom Cole
    Jun 2, 2008
Loading...

Share This Page