javascript - Django static files are not updated -


in django project application my_app has template references javascript static file:

<script src="{% static 'my_app/my_script.js' %}"></script> 

once installed my_script.js in my_app/templates/my_app, seemed work. @ point overwrote my_script.js different script, such my_script.js has different content now.

however, when load my_app browser, loads old my_script.js, although not exist anymore. how can resolve it? thanks.

i use ?v=00001 or define number force clear cache in browser. in case be:

<script src="{% static 'my_app/my_script.js?v=00001' %}"></script> 

or:

<script src="{% static 'my_app/my_script.js' %}?v=00001"></script> 

next time change script, increase number 00002. of course there many ways still prefer method.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -