无法在“ ApplicationCache”上执行“更新”:没有要更新的应用程序缓存 [英] Failed to execute 'update' on 'ApplicationCache': there is no application cache to update

查看:95
本文介绍了无法在“ ApplicationCache”上执行“更新”:没有要更新的应用程序缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ApplicationCache不会缓存任何内容

index.html

ApplicationCache won't cache anything
index.html

<!DOCTYPE html>
<html manifest="cache.appcache">
<head>
<title>Zipcode Database</title>

文件 cache.appcache

CACHE MANIFEST
my.js

htacces 文件

AddType text/cache-manifest .appcache

在控制台中运行

applicationCache.update(); 

然后错误:
InvalidStateError:无法在'ApplicationCache'上执行'update' ':没有应用程序缓存要更新。
代码:11
消息:无法在'ApplicationCache'上执行'update':没有要更新的应用程序缓存。
名称: InvalidStateError
堆栈:错误:无法在'ApplicationCache'上执行'update':没有应用程序缓存要更新。↵

applicationCache.cache = 0

推荐答案

您的 cache.appcache 看起来无效,应该看起来像这样:

Your cache.appcache looks invalid, it should look like this:

CACHE MANIFEST
#v0.0.1 change this to force update

CACHE:
./my.js

如果在此之后仍然无法正常工作,您能否提供完整的HTML,以便我可以对其进行更多测试?

if it's still not working after this, can you provide me a full HTML so I can test it more?

这篇关于无法在“ ApplicationCache”上执行“更新”:没有要更新的应用程序缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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