Html 删除 HTML5 离线 AppCache
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7937736/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Removing HTML5 Offline AppCache
提问by Trott
I have an HTML document with an associated appcache manifest. But now I want to get rid of offline application caching for a while.
我有一个带有关联 appcache 清单的 HTML 文档。但现在我想暂时摆脱离线应用程序缓存。
If I remove mention of the manifest from the <html>
tag, browsers that already have a cached version will continue to use that cached version.
如果我从<html>
标签中删除清单的提及,已经有缓存版本的浏览器将继续使用该缓存版本。
If I update the appcache manifest, well, whatever, there is still an appcache.
如果我更新 appcache 清单,那么无论如何,仍然有一个 appcache。
What is the most sensible way to go about removing offline application caching? I suppose that I could just change the manifest to have no entries other than:
删除离线应用程序缓存最明智的方法是什么?我想我可以将清单更改为除了以下内容之外没有其他条目:
NETWORK:
*
Then it won't actually cache anything.
那么它实际上不会缓存任何东西。
But surely there must be a way to get rid of the appcache and the manifest file altogether, no?
但肯定有办法完全摆脱 appcache 和清单文件,不是吗?
回答by Daan
You simply need to remove the appcache manifest from your server. If the browser can't access the manifest file, it will stop caching your app and remove all cached data.
您只需要从服务器中删除 appcache 清单。如果浏览器无法访问清单文件,它将停止缓存您的应用并删除所有缓存数据。
Some useful information from two sites:
来自两个站点的一些有用信息:
If the manifest file itself can't be retrieved, the cache will ignored and all cached data associated with it will be disregarded.
如果无法检索清单文件本身,缓存将被忽略,所有与其关联的缓存数据都将被忽略。
http://appcache.offline.technology/
http://appcache.offline.technology/
Application caches can also become obsolete. If the manifest is removed from the server, the browser removes all application caches that use that manifest, then sends an "obsoleted" event to the application cache object. Then the application cache's status is set to OBSOLETE.
应用程序缓存也可能过时。如果清单从服务器中移除,浏览器将移除使用该清单的所有应用程序缓存,然后向应用程序缓存对象发送“已废弃”事件。然后应用程序缓存的状态设置为 OBSOLETE。
https://developer.mozilla.org/en/Offline_resources_in_Firefox
https://developer.mozilla.org/en/Offline_resources_in_Firefox
回答by Trevor Prime
FOR anyone coming across this question and who've deleted the appcache manifest, deleted the browser's cache and removed the manifest from the server and the reference to it in the HTML: If this still did not cause your HTML document to load the update version in Google Chrome, you can go to chrome://appcache-internals/in your browser and click REMOVE next to the manifest you wish to get rid of.
对于遇到此问题并且删除了 appcache 清单、删除了浏览器缓存并从服务器中删除了清单以及 HTML 中对它的引用的任何人:如果这仍然没有导致您的 HTML 文档加载更新版本谷歌浏览器,您可以在浏览器中访问chrome://appcache-internals/并单击您要删除的清单旁边的删除。
回答by coder
Manually delete app cache: Only for Chrome
手动删除应用缓存:仅适用于 Chrome
Enter the follow URL in your chrome browser: chrome://appcache-internals/
在 Chrome 浏览器中输入以下 URL: chrome://appcache-internals/
There you will see a list of every application cache you have in storage with the possibility to remove any of them.
在那里,您将看到存储中的每个应用程序缓存的列表,并可以删除其中任何一个。
回答by Sciurius
In modern Firefox you can manipulate the offline cache with EditPreferences AdvancedNetwork.
在现代 Firefox 中,您可以使用EditPreferences AdvancedNetwork.
In windows it is now (v27.01) ToolsOptionsAdvancedNetwork
在 Windows 中它现在是 (v27.01) ToolsOptionsAdvancedNetwork