I\'m working on a web project but I have this really annoying issue with my browser, Google Chrome... Every time I make changes on my website, my browser won\'t refresh and
This may be the result of using an Application Cache. If you have a cache.manifest included in your page via the html tag: <html manifest="cache.manifest">
, then you have to edit it for the files listed therein to be re-freshed (e.g. consider adding or modifying a comment like #v1.0
).
Also ensure the file you want to update is listed in the cache manifest.
So I also did everything. Cleared the cache, signed out of Chrome. Tried to upload the files using only the FTP etc. etc. etc. Until I realised the reason is server-side caching. I just had to sign into my cPanel and switch Cachewall off.
For testing and developing purpose only, you can make a use of the .htaccess
file inside your developing root server, it will help you control the caching policy of the browser so you will able to work in non-caching environment.
From Wikipedia (.htaccess):
.htaccess files allow a server to control caching by web browsers and proxies to speed up websites
The mod_expires
tell the browser that the file is expire so it will go and fetch it again after 1 minute (you can even set it for 0 seconds - the file immediately expires)
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 minutes"
ExpiresByType text/javascript "access plus 1 minutes"
ExpiresByType text/html "access plus 1 minutes"
ExpiresByType text/css "access plus 1 minutes"
ExpiresByType image/gif "access plus 1 minutes"
ExpiresByType image/png "access plus 1 minutes"
ExpiresByType image/jpeg "access plus 1 minutes"
</IfModule>
see additional answer
Hit control + shift + R for Chrome 75.0.3770.100 (Official Build) (64-bit) this is also the Mac key combination control + shift + F5 doesn't work for me
I have had a similar problem. What I find is that I need to open up the Chrome developer tools and then hit Ctrl + F5. Only then is the cache refreshed.
Update
Also, I would recommend that you select "Disable Cache" in the developers tools ("Network" tab).
You can also try clearing the cookie data for the relative site in development under Application's: storage/cookies option.