AppCache清单错误 [英] AppCache Manifest Error

查看:116
本文介绍了AppCache清单错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑:我必须删除一些链接.

Edit: I had to remove some links.

我的清单页面似乎导致我的网页上出现错误.第一次进入该页面时,所有内容似乎都已成功缓存,但刷新后无法获取存在的文件.

My manifest page seems to be causing errors on my web page. When you first go to the page everything appears to cache successfully, but upon refresh it fails to get files that exist.

我在这里做了一个快速测试页面以进行检出.

I made a quick test page to check out, here.

这是我的清单文件.

这是一个非常动态的网站,由php& javascript,由于这些因素,我对appcache的投入还不够多,所以我不确定问题是否与必须有条件地放入这么多内容这一事实有关.

This is a VERY dynamic site by php & javascript, I haven't got too much into appcache with those factors, so I'm unsure if the issue has to do with the fact that so much content has to be conditionally set in.

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

Any help would be greatly appreciated. NOTE: Java-Console will be needed (best used in Chrome).

更新: 看来,如果有任何文件与清单文件链接如此之多,则会收到GET错误.

UPDATE: It seems that if any file is, so much, as linked to a manifest file it receive GET errors.

成功缓存后,链接到空清单(在行上)的页面的Java控制台将读取以下内容:

The Java-Console for a page that is linking to an empty manifest (while online) reads the following, after successful caching:

> 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 .

I solved my own issue. I re-read some of the old articles that first taught me about appcache. Turns out it was Gotcha #5.

GOTCHA#5:未加载的资源将不会加载到已加载的页面上 缓存index.html但不缓存cat.jpg,该图片将不会显示在 index.html,即使您在线也可以.不,真的,这是故意的 行为,自己看看.

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.

我在清单&中添加了以下内容:现在一切都很好.呜呜.

I added the following to my manifest & now everything is well. Woo-hoo.

这篇关于AppCache清单错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆