When coding my website, I save HTML and CSS docs then refresh my browser to see the changes. However when I refresh the HTML changes are seen but the CSS changes aren't. Instead what I would have to do is close the window and reopen it again to see my CSS changes.
Any ideas why I cant just refresh and see the CSS changes instead of closing the window and reopening?
Browser Cache If you are adding/modifying in-line CSS or JavaScript and not seeing the changes reflected in the HTML source, the page is likely being cached. The solution may be to purge the WordPress object cache, which stores our page caching (Batcache) renders.
Anytime you make changes to CSS, JavaScript and are viewing the page you've updated - you will see this concern. You can force a refresh by pressing CTRL+F5 on the browser and that will get the latest version.
The most common reason is that your CSS file is cached by your browser. To fix this, try force refreshing your browser (Ctrl + F5). If that doesn't work, try clearing your browser's cache. Another possible reason is that you have not uploaded the CSS file to the correct location on your server.
Most probably the file is just being cached by the server. You could either disable cache (but remember to enable it when the site goes live), or modify href of your link tag, so the server will not load it from cache.
Try a "hard" refresh of your browser...
http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache
The idea is to bypass your browser's cache. Different browsers handle this differently, and this wiki article has a nice walk-through for each major browser on how to do this.
Alternatively, you could clear your browser's cache, which is also covered by the wiki article.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With