我认为我们也有类似的问题:
My HTML5 Application Cache Manifest is caching everything
我还没有找到最终的答案,但据我所知,清单似乎并不是要在每个页面上设置。我再次不确定,但这是我遇到的一个黑客。我有一个页面,例如 manifest.html 有
<html manifest="manifest.appcache">
我了解到没有此功能的页面不会被添加到缓存中,但是如果它们位于同一域中,它们仍将继续使用应用程序缓存。因此,如果您包含 manifest.html 一个普通的 html 页面,该页面在每个页面的 iframe 中都有它,它将不会像 chrome 一样缓存该页面将不再输出:
Adding master entry to Application Cache with manifest
但是如果你去网络选项卡你会看到它正在使用缓存
所以基本上不是 html 标签上的 manifest 属性,而是把它放在正文的开头:
<iframe id='manifest_iframe_hack' style='display: none;' src='temporary_manifest_hack.html'>
temporary_manifest_hack.html 的内容:
<!DOCTYPE HTML>
<html lang="en" id="sexxymofo" class="no-js" manifest="manifest.appcache">
<head>
<meta charset="utf-8">
<title>Hack 4 Manifest</title>
</head>
<body></body>
</html>
现在,由于您没有具体说明您的问题,我担心您可能对有效清单有疑问,请记住清单中没有通配符,请使用此 url 进行验证:
http://manifest-validator.com/validate
最简单的错误会导致manifest无效并且不会使用appcache,使用chrome
用于调试,因为控制台将记录该过程的每一步,还可以在 chrome 中查看此 url:
chrome://appcache-internals/
再次查看上面答案中的问题以了解更多信息