Hello,

I recently opened a ticket (#33148 
<https://code.djangoproject.com/ticket/33148>) but it was closed as 
duplicate of (#32891 <https://code.djangoproject.com/ticket/32891>) which 
itself is marked "wontfix".

The reasoning provided by Carlton Gibson for this is:

> *I don't think this is the right approach. As far as I can see the 
browser behaviour is correct and as desired, s**erving static assets from 
the browser cache when possible.*

At least while DEBUG is True, I see no harm in setting `Cache-Control: 
max-age=0` header.

This will allow browsers to cache the files while forcing them to 
revalidate cache using the If-Modified-Since header. This way, Django can 
serve updated files if they get modified or return a 304 response in which 
case browsers will use the cached file (conforming to Carlton's comment 
about using browser cache when possible).

This will aid in development as we now have to open the browser's network 
tab and disable the cache to refresh static files. In Mobile, disabling 
cache is not possible, so we have to test in Incognito Mode. It's a 
frustrating development experience.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/36582e40-8969-4ed7-a4ae-ed6214e64fdfn%40googlegroups.com.

Reply via email to