[XHR2] letting authors handle more response codes

Hi,

I've heard some use cases from authors who want to handle more response  
codes. For 30x responses and 401 responses. 304 is already addressed by  
XHR1 by letting the author set various headers himself that will let the  
user agent pass through the actual response if it's a 304. However,  
redirects are always transparantly and a 401 will trigger a dialog where  
the user will have to enter credentials.

Letting the author handle redirects helps him save bandwidth or lets him  
inspect the redirect URI to see whether or not to follow it. Letting him  
handle 401 responses would help in the case where the user entered  
credentials in the first place and then a request was made using those  
credentials and they were entered incorrectly. In such cases handling it  
within your application might give a better user experience than letting  
the browser handle it.

For redirects a 'redirect' event is proposed in the draft, but maybe a  
general attribute that would indicate that the author wants to handle  
responses himself would be better. Although it seems that only 401 and  
redirects are affected by this so maybe a redirect and unauthorized event  
would work...

Any opinions?

Cheers,


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 6 August 2007 13:47:39 UTC