Changes in CSS (Style sheet) not reflecting in the Page

Hey team,

This is the first time I am creating a post on this channel, so please assist me with the problem. I am still at a beginner level and learning how to code in Django framework. I am okay with all the basic details, however, it is the CSS integration that is creating an issue for me. Initially, when I create a project, update static files settings (as mentioned in the DOC), the projects/integration works well but later on when I login back again to complete the project, everything works but the CSS. The changes I make in CSS doesn’t get reflected the second time unlike the first time when I was able to designed the page successfully. I’ll be very thankful If I can have way-out for this issue. Thank you in advance and sorry for any inconvenience

1 Like

Your browser may be caching the css files within the browser, preventing the changes from being loaded. Try doing a “full” page refresh.
On Windows in either Chrome or Firefox, hold down either the shift or ctrl key and click on the reload icon (the “circle arrow”), or do a ctrl-F5 (reload key).

You can tell whether or not this is happening by watching the console where you’re running runserver. If you don’t see requests for the css file, then the browser is using it’s cached copy. (If you are seeing requests for the css file, then there’s a different issue.)



To add to what @KenWhitesell said, you can also disable caching by setting an option in the Developer Tools for your browser. This is a nice alternative so you can avoid having to remember to clear your cache with a keyboard shortcut.

Usually, on the Network tab, you can find something that will disable caching. In the screenshot I posted, I’m showing the Firefox developer tools Network tab. You can see a “Disable Cache” checkbox on the right side. Chrome developer tools have a very similar option.

1 Like