[Answered ]-Changing Cookie header value at every request in Django

1👍

Sorry, this has nothing todo with django.

The changing cookie values were caused by the google analytics tracker.

This made the standard chache_site mechanism impossible.

👤msmart

1👍

As @msmart found, this is an annoying effect of Google Analytics and a bit of a problem with the vary-on-cookie pattern (you can’t specify which cookies you want to vary on)

There is a bug for Django here:
https://code.djangoproject.com/ticket/9249
which has a patch for Django.

This will let you get your Django-side caching behaviour working again, but http proxy caches will still fail to cache pages due to the changing cookies.

0👍

what are you using for the session backend?

see: http://docs.djangoproject.com/en/dev/topics/http/sessions/#configuring-the-session-engine

whoops…should have been a comment…not an answer…

Leave a comment