Chrome WON'T clear cache… ctrl + F5 doesn't seem to work either

后端 未结 16 1260
南旧
南旧 2020-12-14 00:05

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

相关标签:
16条回答
  • 2020-12-14 00:10

    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.

    0 讨论(0)
  • 2020-12-14 00:16

    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.

    0 讨论(0)
  • 2020-12-14 00:16

    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

    0 讨论(0)
  • 2020-12-14 00:17

    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

    0 讨论(0)
  • 2020-12-14 00:25

    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).

    0 讨论(0)
  • 2020-12-14 00:25

    You can also try clearing the cookie data for the relative site in development under Application's: storage/cookies option.

    0 讨论(0)
提交回复
热议问题