W3C home > Mailing lists > Public > public-webapi@w3.org > May 2007

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

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 30 May 2007 01:29:13 +0200
To: "Stewart Brodie" <stewart.brodie@antplc.com>
Cc: "Web API WG (public)" <public-webapi@w3.org>
Message-ID: <op.ts33iza364w2qv@annevk-t60.oslo.opera.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:57 GMT