When I make any changes to my CSS file, the changes are not reflected in the browser. How can I fix this?
Have you tried renaming the new version of your CSS to CSSv2.css and then directing your page to use that? If that solves the stale-file issue, then you're just experiencing non-refreshing files. If not, you've got bigger issues.
This sounds like your browser is caching your css. If you are using Firefox, try loading your page using Shift-Reload.
If you're using ASP.NET web forms, make sure that you are using the right theme:
I just spent about an hour trying to solve this!
The Ctrl + F5 solusion didn't work for me in Chrome.
But I found How to Clear Chrome Cache for Specific Website Only (3 Steps):
- As the page is loaded, open Chrome Developer Tools (Right-Click > Inspect) or (Menu > More Tools > Developer Tools)
- Next, go to the Refresh button in Chrome browser, and Right-Click the Refresh button.
- Select "Empty Cache and Hard Refresh".
Hope this answer helps someone!
I had this issue, I was scratching my head for the best part of two days.
Turns out I completely forgot I had CloudFlare setup on the domain I was live testing on.
CloudFlare caches your JavaScript and CSS. Turned on development mode and BAM!
Seriously... two whole days.
Is this a local custom CSS file? Is this your website? Maybe you should clear your cache.
Also the last CSS declaration takes precedence.