无缓存 - HTML5 - 资源提取失败(4)

时间:2014-12-09 11:04:42

标签: html5 caching

我希望我的网站在浏览器(chrome)中拥有绝对无缓存。我想用清单文件解决这个问题,因为元标记没有效果。

这是我的解决方案:

in html:

<html manifest="cache.manifest">

在我的cache.manifest文件中:

CACHE MANIFEST

#Cache manifest version 1.0

CACHE

#no cache

NETWORK
*

和chrome日志中的错误:

Creating Application Cache with manifest http://localhost/editor-xampp/cache.manifest
Application Cache Checking event
Application Cache Downloading event
Application Cache Progress event (0 of 3) http://localhost/editor-xampp/CACHE
Application Cache Error event: Resource fetch failed (4) http://localhost/editor-xampp/CACHE

有人有解决方案吗? 什么意思:Resource fetch failed (4)

请求帮忙!

2 个答案:

答案 0 :(得分:0)

CACHE和NETWORK行被假定为要缓存的资源的路径。 您需要在CACHE和NETWORK之后添加冒号':'以指示它们是节。

答案 1 :(得分:0)

错误事件在以下情况下触发:

  

1)清单不可用

清单返回410或404 HTTP,联系清单的尝试终止。

  

2)引用页面无法下载

尝试联系清单的页面遇到传输错误。

  

3)下载清单内容时出现致命错误

清单中列出的文件在下载时遇到错误。

  

4)更新期间的清单更改

更新过程中的清单更改(在这种情况下,再次联系清单以尝试其他更新)。