Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XMLHttpRequest hangs on readyState 3

From: "Umut Alev - MSFT" <xml@---------.--->
To: NULL
Date: 9/2/2006 5:45:00 AM

Andres,

ReadyState==3 means the data is being downloaded. That means on W2K machine 
the download is taking significantly longer. Have you tried to accessing the 
"url" from the IE address bar from W2K and XP to see if you can repro the 
delay in IE.

Also on W2K which msxml dll(s)  is(are) installed and what is the version 
number? Please provide the same info for XP too.

-- 
Regards,
- Umut Alev [MSFT]

This email sent from a machine running Vista RC1.


"coolvirus" <Andres.Munoz315@g...> wrote in message 
news:1155332895.894543.43990@i......
> I'm using the XMLHTTPRequest JavaScript object to fetch updated info
> from the server.
>
> The problem I'm having occurs on Windows 2000/IE 6.  There is a very
> long pause on readyState 3 (close to a minute, maybe more) but it
> eventually gets to readyState 4.  I have no idea why.  The page works
> just fine on Windows XP/IE 6.
>
> There is no delay or hang up on the server side as far as I can tell
> (if we get to readyState 3 is because the server already sent its
> response).
>
> Does anyone know what takes place between readyState 3 and 4 and why
> does this happen on Windows 2000 but not on Windows XP?
>
> Any input will be greatly appreciated.
>
> Here's the code for illustration purposes.
>
> var xmlobj=null;
> var data=new Array();
>
> function sendRequest(doc)
> {
>   // check for existing requests
>   if( xmlobj != null && xmlobj.readyState != 0 && xmlobj.readyState !=
> 4 )
>   {
>      xmlobj.abort();
>   }
>
>   xmlobj = createXMLHttpRequest(); //my own library function to create
> object
>   xmlobj.onreadystatechange=stateChecker;
>   xmlobj.open('GET',doc,true);
>
>   xmlobj.setRequestHeader("Cache-Control", "no-cache");
>   xmlobj.setRequestHeader("If-Modified-Since", "Wed, 31 Dec 1980
> 00:00:00 GMT");
>   xmlobj.setRequestHeader("Expires", "Wed, 31 Dec 1980 00:00:00 GMT");
>
>   xmlobj.setRequestHeader("Connection", "close");
>
>   xmlobj.send(null);
> }
>
>
> function stateChecker()
> {
>   alert( "stateChecker: xmlobj.readyState = " + xmlobj.readyState );
>
>   if( typeof(xmlobj) != "undefined" && xmlobj != null &&
> xmlobj.readyState == 4 )
>   {
>       if(xmlobj.status == 200)
>       {
>           data=xmlobj.responseText.split('\n');
>           displayData();
>       }
>       else if( xmlobj.status != 0 )
>       {
>           alert("Failed to get response: "+ xmlobj.status + " - " +
> xmlobj.statusText);
>
>       }
>   }
> }
>
> function displayData()
> {
>   //Dynamically re-draw page here.
> }
> 



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent