On 07/11/12 07:46, Denny Vrandečić wrote:
There is a changeset to ULS providing one solution: https://gerrit.wikimedia.org/r/#/c/32030/
As I said on the changeset, adding Vary: Cookie doesn't actually do anything, but if you did make it do something, the result would be essentially no caching, since there is client-side code deployed which sets random cookies for all anonymous users.
The variant feature has much the same problem, and they solved it by putting the language code in the URL, and then purging all possible language URLs when a page is changed. Then only the language-independent URLs need to send Vary: Accept-Language. I think that is the best solution here, also.
Maybe it would be possible to vary on the value of the ULS language cookie, but it would require patches to Squid and Varnish. Maybe you could get away with just patching every client-side extension to use local storage instead of cookies, but the result would be pretty fragile since apparently, all our frontend developers love $.cookie and use it by reflex.
-- Tim Starling