W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: [XHR] Redirects

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 01 Sep 2010 08:26:09 +0200
To: "Darin Fisher" <darin@chromium.org>
Cc: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vicb5snz64w2qv@anne-van-kesterens-macbook-pro.local>
On Tue, 31 Aug 2010 22:51:19 +0200, Darin Fisher <darin@chromium.org>  
> If instead, we had an API for auditing redirects (perhaps an "onredirect"
> event), then we could let developers handle that event and call
> preventDefault if they want to stop redirect processing.  Otherwise, the
> redirect would be processed normally.  The result being that application
> authors would be guided away from following redirects manually, and hence
> they would avoid the problems I've described above.

This does not work for synchronous requests in a worker. If we are okay  
with that it seems an acceptable alternative. However, redirects are  
processed before the object reaches HEADERS_RECEIVED (as otherwise it  
would reach that several times) so HTTP headers et cetera are not  
available yet. Given that, and given that you want that information, you  
would always invoke preventDefault(), defeating the purpose of having an  

Anne van Kesteren
Received on Wednesday, 1 September 2010 06:26:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:11 UTC