Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
383 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...