Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
469 views
in Technique[技术] by (71.8m points)

settings - How do I disable cache in Safari 11.0?

I updated Safari today to 11.0 and the 'disable cache(s)' menu item (under Develop) is missing. Anyone know the new way to effect this?

question from:https://stackoverflow.com/questions/46324675/how-do-i-disable-cache-in-safari-11-0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 ignore the resource cache icon in the top right (it turns blue when active).

After experimentation with the ignore the resource cache 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:

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...