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

Google ChromeCaching

Google Chrome Problem Overview


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 clear the cache. It works totally fine in my friend's Chrome browser, but not for me apparently.

As mentioned ctrl + F5 does not work for me. I tried to press F12 (for developer console) and right-click on the refresh icon, and then click "Empty Cache and Hard Reload". Still doesn't work... Actually not true, it worked once - but now it stays the same again... I tried reinstalling chrome too, still didn't work... I tried to clear my whole history including all passwords, cache and so on - but nothing has fixed the issue.

Edited on 02-05-2020: Some of your answers worked for me, but some time ago I found a Chrome extension that works really well for me and I wanted to share with the community. It is called "Clear Cache" and you can find it here:

https://chrome.google.com/webstore/detail/clear-cache/cppjkneekbjaeellbfkmgnhonkkjfpdn/RK%3D2/RS%3DzwqaryCReNAACSfd_oYYPpX0_tw-

Google Chrome Solutions


Solution 1 - Google Chrome

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

Solution 2 - Google Chrome

Also if you right click the reload button there is a Empty Cache and Hard Relaod option

This doesn't work unless you have dev tools open. So you need to first inspect the element, then right click on the refresh button. Then you have the options of Empty Cache and Hard Reload

Solution 3 - Google Chrome

The only thing that worked for me was logging out of my google account. For some reason, being logged in to an account shared between various devices wasn't allowing the cache to purge properly. I tried clearing the browser cache manually, Using a 3rd party cache cleaner, flushing the DNS cache, checking the checkbox in dev tools to ignore cache, using an incognito window. Nothing worked! As soon as I logged out everything purged from the test device properly.

Solution 4 - Google Chrome

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

Solution 5 - Google Chrome

I tried everything, even uninstalling Chrome itself. No luck. It turned out that it's caching using your Google account. I "solved" the issue by appending a random string to my .js filename.

<script type="text/javascript" src="js/bundle.js?r=37173634873"></script>

where the number is always different. You can use PHP or the bundler itself

This forces the browser to load the "new" js file

Solution 6 - Google Chrome

In my case, none of the described solutions worked. I have Google Chrome version 71.0.3578.98 64 bit. However, playing around with Chrome controls I found this solution:

  1. Click on the 3 vertical dots on the top right corner of the browser
  2. Click on "More tools"
  3. Click on "Clear Browsing data..."
  4. Under the almost invisible "Basic" tab, change "Time range" to "All time"
  5. Uncheck "Browsing history", unless you want to clear this data too
  6. Uncheck "Cookies and other site data", this one is highly recommended, you probably don't want to lose your login names and passwords for all sites.
  7. Check "Cached images and files", this is what we want to clear
  8. Click the blue button "Clear data"

That's all.

Solution 7 - Google Chrome

The last time F5 and Ctrl-F5 didn't work for me was when I hit the F-lock key (Microsoft keyboard) It is like Num-Lock but for the function key.

Solution 8 - Google Chrome

It seems that CTRL+F5 is for Internet Explorer, and Shift+F5 is for Chrome.

EDIT (Feb 21, 2019): With the more recent Chromes, I've switched to CTRL-Shift-R as this seems to be the official - and more reliable - behaviour.

Another answerer pointed out that right-clicking the reload button gave the option, but this no longer seems to be the case (Version 72.0.3626.109).

Solution 9 - Google Chrome

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.

Solution 10 - Google Chrome

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

Solution 11 - Google Chrome

If other advices like Ctrl + F5 and diabling cache still don't work for you, check if Chrome Data Saver is installed and switched on and disable it if it is.

Link to the Chrome Data Saver ext https://chrome.google.com/webstore/detail/data-saver/pfmgfdlgomnbgkofeojodiodmgpgmkac?hl=en (you can see if it is installed at the page and how to switch it off).

Solution 12 - Google Chrome

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

Solution 13 - Google Chrome

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.

Solution 14 - Google Chrome

I've had this problem countless times while developing software. Even completely clearing the Chrome cache doesn't always work.

The solution for me was to install the Chrome extra: Classic Cache Killer. You click on it in the toolbar, the icon turns green, and as far as I can tell, Chrome caches nothing. It automatically turns itself off when you move to another web site. It has a 5 star rating with over 28,000 reviews.

Once you've loaded a page with Cache Killer on, the old cache files relevant to that page are gone.

Solution 15 - Google Chrome

Open Chrome Developer Tools By pressing F12 Then Application > LocalStorage and Click the right mouse button and clear. Simply you need to clear the localstorage. You can also do the same thing by using any chrome extension

enter image description here

Solution 16 - Google Chrome

It depends on account, need to log out or use chromium for better testing, this piece of code give exact information about held memory:

async getCacheStoragesAssetTotalSize() {
        const cacheNames = await caches.keys();

        let total = 0;

        const sizePromises = cacheNames.map(async cacheName => {
            const cache = await caches.open(cacheName);
            const keys = await cache.keys();
            let cacheSize = 0;

            await Promise.all(keys.map(async key => {
                const response = await cache.match(key);
                const blob = await response.blob();
                total += blob.size;
                cacheSize += blob.size;
            }));

            console.log(`Cache ${cacheName}: ${cacheSize} bytes`);
        });

        await Promise.all(sizePromises);

        return `Total Cache Storage: ${total / 1e6} MB`;
    }

Solution 17 - Google Chrome

In Mac is as simple of shift + cmd + R. I can imaging in windows is similar as shift + control + R

Life is easy do not complicate.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBenderView Question on Stackoverflow
Solution 1 - Google ChromeDavid BrowerView Answer on Stackoverflow
Solution 2 - Google ChromefrazrasView Answer on Stackoverflow
Solution 3 - Google ChromeTesterView Answer on Stackoverflow
Solution 4 - Google ChromesecuretypeView Answer on Stackoverflow
Solution 5 - Google ChromeGianluca GhettiniView Answer on Stackoverflow
Solution 6 - Google ChromeIvan GilView Answer on Stackoverflow
Solution 7 - Google ChromeBruno MelliView Answer on Stackoverflow
Solution 8 - Google Chromepr3sidentspenceView Answer on Stackoverflow
Solution 9 - Google ChromeDaniel GuentherView Answer on Stackoverflow
Solution 10 - Google ChromeEddieBTView Answer on Stackoverflow
Solution 11 - Google ChromeFreeWorlderView Answer on Stackoverflow
Solution 12 - Google ChromeShahar ShokraniView Answer on Stackoverflow
Solution 13 - Google ChromeAndi DollarView Answer on Stackoverflow
Solution 14 - Google ChromeBob RayView Answer on Stackoverflow
Solution 15 - Google ChromeAhmad SharifView Answer on Stackoverflow
Solution 16 - Google ChromeGregory KovalchukView Answer on Stackoverflow
Solution 17 - Google ChromeOscarView Answer on Stackoverflow