问题描述
我有一个带有关联的appcache清单的HTML文档.但是现在我想摆脱离线应用程序缓存一会儿.
I have an HTML document with an associated appcache manifest. But now I want to get rid of offline application caching for a while.
如果我从< 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.
如果我更新了appcache清单,那么无论如何,仍然有一个appcache.
If I update the appcache manifest, well, whatever, there is still an 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.
但是肯定有一种方法可以完全摆脱appcache和清单文件,不是吗?
But surely there must be a way to get rid of the appcache and the manifest file altogether, no?
推荐答案
您只需要从服务器中删除appcache清单.如果浏览器无法访问清单文件,它将停止缓存您的应用并删除所有缓存的数据.
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.
来自两个站点的一些有用信息:
Some useful information from two sites:
http://appcache.offline.technology/
https://developer.mozilla.org/en/Offline_resources_in_Firefox
这篇关于删除HTML5离线AppCache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!