#32891: runserver serve static files cached in debug
-------------------------------------+-------------------------------------
     Reporter:  TZanke               |                    Owner:  TZanke
         Type:  Bug                  |                   Status:  closed
    Component:  contrib.staticfiles  |                  Version:  3.2
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * status:  assigned => closed
 * resolution:   => wontfix


Comment:

 Hi Tobias — Welcome aboard!

 > Possible fix: Add add_never_cache_headers to the static.py serve method

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

 When working on a file this behaviour can be undesired. For that all the
 browsers allow disabling the caches (at least while the dev tools are
 open) by accessing the settings (normally via the little cog or hamburger
 menu on in the dev tools, or via the Develop menu in Safari). If you check
 this static assets are fetched on each request.

 If you **really** wanted to add no cache headers you could do so in a
 middleware, but I don't think it's appropriate for projects in general.

 I hope that makes sense.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32891#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.196e8d9c9a5a602537a2de533c71a6b2%40djangoproject.com.

Reply via email to