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

Re: [XHR] Redirects

From: Darin Fisher <darin@chromium.org>
Date: Tue, 31 Aug 2010 10:04:08 -0700
Message-ID: <AANLkTinVeXBy=GkAE+MF0pWy3cP7k08FgeLADd5MofFQ@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: WebApps WG <public-webapps@w3.org>, Joćo Eiras <joao.eiras@gmail.com>
On Fri, Aug 27, 2010 at 5:50 AM, Anne van Kesteren <annevk@opera.com> wrote:

> On Fri, 13 Aug 2010 00:13:16 +0200, Joćo Eiras <joao.eiras@gmail.com>
> wrote:
>
>> Between the boolean and an integer, the integer is more useful, although
>> seeing long redirection chains is somewhat rare and overkill.
>>
>
> I went for a boolean followRedirects attribute as that gives sufficient
> low-level control that people can implement whatever behavior they want on
> top of that. (Including every use case mentioned in this thread.) This is an
> XMLHttpRequest Level 2 feature now:
>
> http://dev.w3.org/2006/webapi/XMLHttpRequest-2/
>
>
>
So the idea is that you would have to manually create the redirect request
using a new XHR if you wanted to manually follow the redirect?

One risk with that is that it is easy to construct the redirect request
improperly.  There's the classic example of what happens when you issue a
POST request and it results in a redirect.  303 and 307 had to be invented
because some browsers implemented 302 incorrectly.

Maybe there should be a way to create a new XHR from the existing XHR that
is already configured to follow the redirect?  I'm not sure how to make this
less awkward...

-Darin



>
> --
> Anne van Kesteren
> http://annevankesteren.nl/
>
>
Received on Tuesday, 31 August 2010 17:04:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:40 GMT