Which URI to use after followng redirects: Follow 301s only.

We have just written some more code for the tabulator extension,  
affecting how the browser deals with redirects.   The question is what  
URI should be displayed in the data browser URI bar, bookmarked, etc.

Our conclusion is:

1. The client follows any number of redirects (within reason) to  
(hopefully) eventually a 200 and parses the document with the 200.

2. The browser displays information about the thing originally asked  
for, so if there is a 303 redirect from A to B  it will find  
information about <A> in <B>, and the URI displayed and bookmarked  
will be A, and information about A will be displayed.

3. In a series of many redirections, the URI displayed in the URI bar  
follows contiguous 301 (moved) redirections only.


Example:

A  --301--> B
URI displayed is B

A  --302--> B
URI displayed is A

A  --303--> B
URI displayed is A

A  --301--> B  --303--> C
URI displayed is B

A  --301--> B  --301--> C
URI displayed is C

A  --301--> B  --301--> C  --303--> D
URI displayed is C

A  --301--> B  --301--> C  --303--> D  --301--> E
URI displayed is C

A  --302--> B  --301--> C  --303--> D
URI displayed is A

A  --301--> B  --303--> C
URI displayed is B

A  --303--> B
URI displayed is A

The effect is to give the user generally the URI they were interested  
in or referred to, unless it is declared by the server to be inferior  
to the proposed new URI.

Tim

Received on Wednesday, 30 January 2008 21:31:22 UTC