How do I disable cache in Safari 11.0?

梦想的初衷 提交于 2019-11-30 04:20:26

As Adam has answered there was information about disable caches added to the release notes, and I've updated my answer accordingly:


  1. For a one-off, you can use R on the page to reload from origin or R from Web Inspector.
  2. For a more permanent solution, you can tell Safari to ignore cache when loading resources by opening Web Inspector then going to the Network tab and setting the

    icon in the top right (it turns blue when active).

After experimentation with the

option in the Network tab, it doesn't appear to behave as documented in the release notes:

  • The setting appears to persist until manually disabled, even when quitting Safari.
  • Caching appears to be disabled for all pages, not just the inspected one.
  • Web Inspector didn't always need to be left open.
  • Resources served from localhost are sometimes still served from the memory cache, even if caching is disabled in the Network tab. Restarting Safari seemed to clear this behaviour.

Safari Technology Preview Release Notes (Release 27)

Browser Changes

  • Added a “Reload Page From Origin” alternate menu item to the View menu. This action reloads a page without using cached resources.
  • Removed the Option-Command-R (⌥⌘R) keyboard shortcut from “Enter/Exit Responsive Design Mode” and mapped it to “Reload Page From Origin” instead.
  • Removed the Disable Caches menu item in the Develop menu. The equivalent functionality is now available through Web Inspector’s Network tab.

Web Inspector

  • Added “Disable Caches” toggle in the Networking tab that only applies to the inspected page while Web Inspector is open.

Safari 11.1

The appearance of the icon has changed slightly in Safari 11.1:

It looks like (according to the “Safari Technology Preview Release Notes”) that the only way is to open the “Web Inspector” and go the the “Network” tab, and click the small button to ignore the resource cache.

From my testing on Safari 11.0.3, you should restart Safari after toggling "Ignore the resource cache when loading resources".

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!