删除HTML5离线AppCache

前端之家收集整理的这篇文章主要介绍了删除HTML5离线AppCache前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个带有关联的appcache清单的HTML文档。但现在我想摆脱离线应用缓存一段时间。

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

如果我更新appcache清单,那么,无论如何,仍然有一个appcache。

删除离线应用程序缓存最明智的方法是什么?我想我可以将清单更改为除了以下条目之外:

NETWORK:
*

那么它实际上不会缓存任何东西。

但是肯定有一种方法来完全摆脱appcache和manifest文件吗?

解决方法

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

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

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

原文链接:https://www.f2er.com/html5/169314.html

猜你在找的HTML5相关文章