Answer the question
In order to leave comments, you need to log in
How to cache in django depending on HTTP_ACCEPT?
In my page templates, they are given depending on the HTTP_ACCEPT header (two cases: does the browser understand images in webp or not). I caught a bug for a long time, why sometimes (!!!) photos are not visible on iOS, and I realized that the problem is in the cache, where pages with webp images get, and it dawned on me that the page just got into the cache.
How can I cache them separately?
Answer the question
In order to leave comments, you need to log in
By default, pages in Django are not cached. Add the Accept header to your caching settings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question