Re: [XMLHttpRequest] SENT state (readState = 2)

On Tue, 29 May 2007 17:14:14 +0200, Stewart Brodie  
<stewart.brodie@antplc.com> wrote:
> What happens if you write a CGI script at the server that deliberately  
> waits a bit between receiving the request and sending the response?  Do  
> IE & FF
> switch to state 2 at *that* point?  (i.e. indicating that it's finished
> sending the request but it hasn't received the response headers back yet)

I tested that and it seemed like nothing changed. However, I'd love some  
other people to try that out.


> I prefer Opera's behaviour, FWIW.  I don't like the idea that if you have
> scripting that is checking up on the state of the XHR object, then it  
> will find that the readyState is still OPEN when actually you've already  
> invoked the send() method.

Suggestions for better names for OPEN and SENT are welcome. Unfortunately  
we can't change the way the object works. If we could do that we would  
probably redesign most of it anyway...


> The problem is that an additional state is probably needed ("SENDING")  
> that covers the period of time during which the client is transmitting  
> the
> request between OPEN and SENT.  You already know that I strongly disagree
> with the spurious readystatechange events when the ready state hasn't
> changed.  I wonder if this is what those spurious events are actually  
> for - to cover up the lack of a separate state between OPEN and SENT?

Dunno, Microsoft?


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Tuesday, 29 May 2007 23:30:01 UTC