删除HTML5离线AppCache [英] Removing HTML5 Offline AppCache

查看:82
本文介绍了删除HTML5离线AppCache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有关联的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:

如果清单文件本身无法检索,则缓存将被忽略并且所有与之关联的缓存数据都将被忽略.

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

这篇关于删除HTML5离线AppCache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆