Django CSS not updating

You have to click on Ctrl + f5 every time to update your CSS, which isn't dope. You can actually do something like this:

<link rel="stylesheet" href="/static/css/mycss.css?{% now "U" %}"/>

The {% now "U" %} will generate a random timestamp which updates your CSS every time you reload the page. I hope this works.

For better understanding check out: click here


ctrl+f5 for Chrome and Windows helped.


If you are on mac and using safari, you can press shift then press the reload key.


You can bypass the cache using ctrl + F5

for detailed reference: https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache

Tags:

Css

Django