【问题标题】:No Cache - HTML5 - Resource fetch failed (4)无缓存 - HTML5 - 资源提取失败 (4)
【发布时间】:2016-05-21 18:11:06
【问题描述】:

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

这里是我的解决方案:

在 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)

感谢您的帮助!

【问题讨论】:

    标签: html caching


    【解决方案1】:

    CACHE 和 NETWORK 行被假定为要缓存的资源的路径。 您需要在 CACHE 和 NETWORK 之后添加一个冒号 ':' 以表明它们是部分。

    【讨论】:

      【解决方案2】:

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

      1) 清单不可用

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

      2) 引用页面下载失败

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

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

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

      4) 更新期间的清单更改

      清单在更新过程中发生变化(在这种情况下,清单会再次联系以尝试另一次更新)。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-02-08
        • 1970-01-01
        • 2014-02-03
        • 2012-07-20
        • 1970-01-01
        • 2017-10-07
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多