How to disable all caches in safari 11

developmentsafari

I am using Safari to develop for a while. One thing I always liked is when you clear the cache, it really does, unlike other browsers I tried in the past. But in previous versions, specially when working in a code in a local testing server, just reloading the page will reload everything from disk. Now I have to use de shortcut command+alt+e to clear before reload or some new CSS won't load, even some http request will return old values. Just reloading the page won't guarantee to show me the last modifications.

I looked at preferences and develop menu but didn't find an option to just don't use any caches at all – the perfect option will be don't use caches when I have the web inspector opened, means I am developing.

Did I miss this option, or there is another way to disable all caches?

Best Answer

In the Web Inspector, under the Network tab, unselect ‘Use the resource cache when loading resources’. Blue means the cache is not used, black means the cache is used.

                                                

As you wished, this only takes effect when the web inspector is open. Note that this is a cache bypass, not a permanent ‘cache empty’, so when you un-bypass the cache, any cache from prior to the bypass will be used. To use the latest resources with the web inspector closed, empty the cache using the button to the right or Develop → Empty Caches (⌥⌘E).

Currently, in Safari Technology Preview there is a re-designed Network tab in the Web Inspector with a new cache bypass icon, which I expect to make its way to Safari soon.