[Django]-I deleted a css static file but my website still reads it?

2πŸ‘

βœ…

I fixed it by clearing the cache in my browser. The blog.css from the cache is not found anymore.

πŸ‘€Ken Flake

9πŸ‘

to test the changes of css or js or any such static files follow any preferred approach listed below

Simple way of approach:

  • Refresh tab by pressing (Ctrl + F5) instead of only using F5
  • Open private window or incognito window and run the website
  • Clear browser cache
  • Try to use different browser (prefer a browser which wasn’t used to open the site or having cache of the site)
  • Disable Cache while developer tools are open: follow steps in this answer
πŸ‘€Gahan

4πŸ‘

That happened to me before, it just took time and reloading the server for the changes to occur, try changing your browser to see if the CSS is gone by now. Django uses caching in browsers to load faster. To resolve the problem you must clear the cache.

πŸ‘€Ryan

0πŸ‘

As mentioned in other answers, the "cache files" seem to be the problem. Try removing the cache (I haven’t tried this).

You could also change the name of the CSS file to something other than the old name. This worked for me.

Leave a comment