Command line flag to disable all cache types in Chrome

I would like to disable memory cache, disk cache and other cache types in Chrome with command line flag. I am now launching Chrome using

open /Applications/Google\ Chrome\ Canary.app --args --disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1

But still, I get resources from the memory cache in Chrome. Is there a way to completely disable all caches from Chrome via the command line flag?

I do not want to do the following: -

  • click the "Disable Cache" button in dev tools. I donโ€™t want to push this cause of another Chrome error that occurs when this button is checked.
  • Press and hold the refresh button for a hard reset. Doing this also bypasses service workers that I donโ€™t want, as I test them.
  • Command + Shift + R is the same reason as above.
+9
source share
1 answer

Well, I used Windows and / null is missing on Windows, so I just typed --disk-cache-dir = / dev / null, which, as mentioned above, does not exist, and it worked. So what I'm saying, try typing in some random path, such as / srbc /, as the path and chrome should probably avoid caching, since the path does not exist

0
source

Source: https://habr.com/ru/post/1258963/


All Articles