W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: XHR timeout and browsing context destruction

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 05 Apr 2006 03:57:37 -0700
Message-ID: <4433A2A1.9080209@sicking.cc>
To: Stéphane Sire <sire@intuilab.com>
Cc: public-webapi@w3.org

Stéphane Sire wrote:
> 
> Hi,
> 
> I have been quickly through XHR draft (version dated 20th March 2006 on 
> CVS) and I have the following two remarks:
> 
> - nothing is said about how to create/manage timeout; I guess the idea 
> is to use the external timer API (for instance in Window object) and 
> then use cancel to end a timed out request...

Apparently HTTP doesn't define timeouts so I think it'd be bad for us to 
add any requirements. So yeah, I think creating your own timers or 
relying other mechanisms to abort requests is the way to go.

I believe that in mozilla we will enable the stop button when the 
request is made and pressing that will abort the load.

> - what happens if the browsing context is destroyed, is the request 
> canceled or not ? is the onreadystatechange function called ?

I'm not sure we want to dictate to browsers what to do here. I would not 
be surprised if some browsers disabled all scripts once you leave a page.

/ Jonas
Received on Wednesday, 5 April 2006 10:57:50 GMT

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