Opened 13 years ago

Closed 13 years ago

#16461 closed New feature (duplicate)

Saving the user's preferred language in the session causes browser caching problems

Reported by: cnorthwood Owned by: nobody
Component: Internationalization Version: 1.3
Severity: Normal Keywords:
Cc: cnorthwood Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If the user's preferred language is saved in the session, rather than as a cookie, and if you are using page caching with Expires: headers, any pages which the user loaded before switching languages will be loaded from the browser cache, in the old language, as opposed to the newly switched to language!

If it was saved in the cookie, the Vary: Cookie header will cause the browser cache to be invalidated when the language (hence cookie) changes, but if the SessionMiddleware is being used, then it is used there. What would be nice is an option to force the locale middleware (and set_language view) to always use cookies, even if the session middleware is loaded. Perhaps even getting rid of the session storage completely - using cookies will stop gotchas like this imo!

Change History (2)

comment:1 by cnorthwood, 13 years ago

Cc: cnorthwood added

comment:2 by Ramiro Morales, 13 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #12794.

Note: See TracTickets for help on using tickets.
Back to Top