gnuherds-app-dev
[Top][All Lists]
Advanced

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

Language selection cannot be undone by using the Back button


From: Victor Engmark
Subject: Language selection cannot be undone by using the Back button
Date: Thu, 12 Apr 2007 09:45:13 +0200

Hi all,

How to reproduce the bug:
  1. Go to any page on gnuherds.org.
  2. Click on any of the language links except the one you're seeing currently.
  3. Go back one page with the Back button.
  4. Click on any link except the language ones.
Result: You get to a page with the previously selected language.

Expected result: You get to a page with the same language as the one you came from.

Work-around: Don't use the Back button to "cancel" your language selection. Instead, click the language link of the language you saw before changing it.

There are several ways to "fix" this, and none of them are perfect. But maybe these ideas could help whoever takes care of this bug:
  1. Use _javascript_ to set the session language when loading a page (only if it's different from the page language). That is, send the value of @lang to the server as part of the JS onload. Requires a bit extra _javascript_, won't work for browsers which don't have _javascript_ enabled, and increases the server traffic a little bit.
  2. Change the target of the language links to go to a page which does an instant HTTP reload to the proper target page. This would get rid of the language parameter in the URL, and sort of force people back to the current page if they press the Back button. It won't work, of course, if the user goes two pages back, and generally it's a bad idea to mess with the Back button.
  3. Change all links to include the language parameter, and forms to include a hidden language field. This really does fix the problem, at the expense of longer links and more markup sent for each page.

--
Victor Engmark
Quidquid latine dictum sit, altum videtur - What is said in Latin, sounds profound
reply via email to

[Prev in Thread] Current Thread [Next in Thread]