- From: Chris Cinelli <chris.cinelli@formativelearning.com>
- Date: Sat, 23 Jun 2012 01:48:25 -0700
- To: public-webapps@w3.org
- Cc: annevk@opera.com
- Message-ID: <CAM1GFk13OaTE90GDvq_kUOhovYOybi1FrrWuxDn_aHYz=T9UmQ@mail.gmail.com>
This is a almost 2 year old thread but I am actually looking in implementing some tools that can only work in 100% of the cases if it is possible for XHR not to follow the redirects. I am not sure why this has been dropped but I think it would be time to bring it back. I think we can agree that being able to read and process the redirects in some way under some limitations, it is far better than not being able to do it at all like it is happening today. I am not an expert of XHR but I read through the posts and this is my proposal to which you can feel free to make changes of any kind. *Instead* of adding a followRedirect true/false, add a processRedirects function. If it is NOT defined the browser keeps behaving how it is currently doing today. If it is defined, the function is called after reading the page and before reading the next page specified by the redirect. processRedirects can return false to say the browser not to follow the redirect. If the function return true, the browser move to the next request and once it completes, it call again processRedirects and so on till the final destination. processRedirects should receives in some way the XHR object, the ordinal number of the redirects followed so far, any other things that makes simple to use read the Location with any other data/header from the server. If it works only in async calls, it should be Ok. Let me know what you think. And I hope that sooner than later we will be able to do a request at the time without necessarily having to follow the redirects. Best, Chris
Received on Sunday, 24 June 2012 20:23:47 UTC