[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian web sites and content negotiation



[Please CC me as I am not on -www]

On Sun, Oct 30, 2005 at 01:14:19AM +0200, Jutta Wrage wrote:
> 
> Am 30.10.2005 um 00:52 schrieb Roberto C. Sanchez:
> 
> > Is there any possible way to have pages on the Debian website set a
> > cookie if the user explicitly selects a language and then continue to
> > use that language as long as the cookie is valid?
> 
> That is currently not possible.
> 
Oh well.

> >   I ask because
> > occasionally I will get annoyed by the website when I start reading a
> > page and switch the language from Spanish to English, only to follow a
> > link on the page and have the content renegotiated to Spanish.
> 
> You will not have that problem, if you change the language _after_  
> following the link on the spanish page. Assumed that page is not  
> available in spanish, you will get the english (or whatever is the  
> next language in your negotioation preferences) automatically.
> 

I am not sure I explained myself sufficiently.  Here is an example:

- I browse to www.debian.org
- Language is set to Spanish based on my Firefox locale
- I scroll to the bottom and choose English instead
- I click on the link for "Documentation"
- The new page comes up in Spanish
- I must again scroll to the bottom and explicitly select English

If the cookie approach is not feasible, perhaps we can check the referer
header.  For example, if I click "English" while viewing www.debian.org,
I am sent to www.debian.org/index.en.html.  If I follow a link *before*
explicitly selecting a language, the referer shows up as
http://www.debian.org/.  However, if I follow a link *after* selecting a
language, then the referer is http://www.debian.org/index.en.html.  By
checking that information, it is possible to see if the user came from a
default negotiated page, or from one where the language was explicitly
selected.  If it is one where the language was explicitly selected, then
the user's browser could be redirected to the appropriate language page.
Thus, going to "Documentation" from http://www.debian.org/index.en.html
can cause a redirect to the appropriate page with the .en.html extension
instead of the default.

This is just an idea.  I'm not sure if it is workable, but hopefully
something can be done as this is a tad annoying.

-Roberto

-- 
Roberto C. Sanchez
http://familiasanchez.net/~roberto

Attachment: pgpqw0vm0Tvg_.pgp
Description: PGP signature


Reply to: