#32891: runserver serve static files cached in debug
-----------------------------------------------+------------------------
               Reporter:  TZanke               |          Owner:  nobody
                   Type:  Bug                  |         Status:  new
              Component:  contrib.staticfiles  |        Version:  3.2
               Severity:  Normal               |       Keywords:
           Triage Stage:  Unreviewed           |      Has patch:  1
    Needs documentation:  0                    |    Needs tests:  0
Patch needs improvement:  0                    |  Easy pickings:  1
                  UI/UX:  0                    |
-----------------------------------------------+------------------------
 Hello,

 right now i experience a problem with runserver and serving static files.

 1) open chrome
 2) open F12 debug tools
 2) start runserver (Debug True)
 3) open django site with a js/css required in head
 4) have a look at a js/css file in network tab of debugger. At first the
 css/js file is loaded with status code 200, on F5 press maybe chrome just
 checks again an gets a 304. Fine. But sometime (at least 80% of the time)
 chrome does not check the server file again. I dont know why chrome does
 not refreshes the file every time when 'just' F5 is pressed. CTRL+F5 will
 fix the issue, but i think runserver with Debug=True should care about
 this problem itself to allow fast and easy development of js/css.

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

 Right now i am not able to check the problem and fix on the latest version
 of Django, is there any simple way to setup a Django Environment with
 master branch to revalidate this issue?

 Merge request on github: https://github.com/django/django/pull/14571

 Right now i am not aware of all your django related requirements for
 submitting a code change / pull request / commit message / tests so please
 be gentle and take my pull request just as a possible example how to fix
 the issue. I know there is a lot more work to do.

 Best regards
 Tobias

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32891>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.7e81690d3eba7fb78c6e82f8fb423cb2%40djangoproject.com.

Reply via email to