html - 删除 HTML5 离线 AppCache

标签 html offline-caching manifest.cache cache-manifest html5-appcache

我有一个 HTML 文档和一个关联的应用程序缓存 list 。但是现在我想暂时摆脱离线应用程序缓存。

如果我从 <html> 中删除对 list 的提及标记,已经具有缓存版本的浏览器将继续使用该缓存版本。

如果我更新 appcache list ,无论如何,仍然有一个 appcache。

删除离线应用程序缓存的最明智方法是什么?我想我可以将 list 更改为除以下内容外没有其他条目:

NETWORK:
*

然后它实际上不会缓存任何东西。

但肯定有办法完全摆脱应用缓存和 list 文件,不是吗?

最佳答案

您只需从您的服务器中删除应用缓存 list 。如果浏览器无法访问 list 文件,它将停止缓存您的应用并删除所有缓存数据。

来自两个站点的一些有用信息:

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/

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.

https://developer.mozilla.org/en/Offline_resources_in_Firefox

关于html - 删除 HTML5 离线 AppCache,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7937736/

相关文章:

html - 数据列表:在输入文本框中显示查询中的匹配选择

html - 隐藏主菜单但不隐藏移动设备上的其他菜单

javascript - html5离线缓存表单数据

c# - 获取缓存破坏的服务/扩展 'version string'

ios - iOS 4.3.4 中是否可以使用离线 HTML5 应用程序?

html - 从 HTML5 离线应用程序缓存中省略当前页面,但使用缓存资源

html - 子目录中的 Favicon 所有子域

HTML5 视频背景仅响应位置 :fixed; however I don't want it to scroll with the page