缓存清单未加载
我想使用 html5 清单文件。缓存网站最重要的内容。我已经制作了一个清单文件并缓存了最重要的内容。我缓存了所有页面中使用的重要图像。我缓存了 css 文件。但这正在被打破。
这是我的清单文件:
CACHE MANIFEST
# VERSION 10
CACHE:
static/img/bg-friends-selection.jpg
static/img/bg-home.jpg
static/img/bg-selection.jpg
static/img/logo.png
static/css/style.css
但现在问题来了。当我打开页面时。第一次还好啊但是当我第二次打开该页面时。我未缓存的图像和项目。没有加载。我该如何解决这个问题。
I want to use html5 manifest file. To cache the mose important things of the website. I have make a manifest file and cache the most important things. I cache the important images that are used in all the pages. And i cached the css file. But this is going broken.
This is my manifest file:
CACHE MANIFEST
# VERSION 10
CACHE:
static/img/bg-friends-selection.jpg
static/img/bg-home.jpg
static/img/bg-selection.jpg
static/img/logo.png
static/css/style.css
But now the problem. When i open the page. The first time it's good. But when i open the page for the second time. The images and items that i not cached. Are not loaded. How can i fix that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实时链接网站未在
标记中指定
manifest
属性。您需要将文档指向清单,以便它知道要缓存什么。无论如何,您可能希望将其放在清单文件的底部:
请参阅 HTML5缓存清单:将所有远程资源列入白名单? 了解更多信息。
The live link site doesn't specify a
manifest
attribute in the<html>
tag. You need to point your document at the manifest so it knows what to cache.In any event, you probably want this at the bottom of your manifest file:
See HTML5 cache manifest: whitelisting ALL remote resources? for more information.