gpt4 book ai didi

php - AppCache list 错误

转载 作者:IT王子 更新时间:2023-10-29 00:08:43 25 4
gpt4 key购买 nike

编辑:我不得不删除一些链接。

我的 list 页面似乎导致我的网页出现错误。当您第一次访问该页面时,一切似乎都已成功缓存,但刷新后却无法获取存在的文件。

我制作了一个快速测试页面以在此处查看。

这是我的 list 文件。

这是一个由 php 和 javascript 编写的非常动态的网站,我对这些因素的应用缓存了解不多,所以我不确定这个问题是否与必须有条件地设置这么多内容这一事实有关中。

任何帮助将不胜感激。注意:需要 Java 控制台(最好在 Chrome 中使用)。

更新:似乎如果任何文件都链接到 list 文件,它就会收到 GET 错误。

链接到空 list 的页面的 Java 控制台(在线在线)在成功缓存后读取以下内容:

> Creating Application Cache with manifest
> https://www.url.org/text/cache-manifest/manifest.appcache Application
> Cache Checking event Application Cache Downloading event JQMIGRATE:
> Logging is active Application Cache Progress event (0 of 0)
> Application Cache Cached event GET
> https://www.domain.org/images/backgrounds/gradient.png net::ERR_FAILED
> GET https://www.domain.org/javascripts/pop_ups.js?_=1393453024093 GET
> https://www.domain.org/javascripts/jquery_plugins/jquery.placeholder.js?_=1393453024094

温暖。

最佳答案

我解决了我自己的问题。我重新阅读了一些最初教会我有关 appcache 的旧文章。结果是 Gotcha #5 .

GOTCHA #5: NON-CACHED RESOURCES WILL NOT LOAD ON A CACHED PAGE If you cache index.html but not cat.jpg, that image will not display on index.html even if you’re online. No, really, that’s intended behaviour, see for yourself.

To disable this behaviour, use the NETWORK section of the manifest

CACHE MANIFEST
# v1index.html
NETWORK:
*

The * indicates that the browser should allow all connections to non-cached resources from a cached page. Here, you can see it applied to the previous example. Obviously, these connections will still fail while offline.

我将以下内容添加到我的 list 中,现在一切正常。呜呼。

关于php - AppCache list 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22049862/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com