0
我开始使用离线webapps。Html5缓存清单无法正常工作
我做了一个测试网站的缓存清单,但我不能让它工作。
我试过,当离线时,它从index.html重定向到offline.html,但它只是下载index.html并显示它。
这是我的缓存清单:
CACHE MANIFEST
FALLBACK:
./ ./offline.html
里面的index.html只有一个行:
Hello this is a test, you are online
这是offline.html
<html manifest='cmanifest'>
<head></head>
<body>you are offline now</body>
</html>
UPDATE
现在我有这个问题:
我添加了一个链接,该链接应该在联机时进入一个站点,在脱机时应该另一个站点,但它只是一直加载online.html。
我的index.html是现在这个样子:
<html>
<a href='online.html'>Ir a online.html</a>
</html>
而且我的缓存是这样的:
CACHE MANIFEST
#v2
FALLBACK:
./online ./offline.html
NETWORK:
*