html5 appcache加载顺序
我正在创建一个包含大量视频/大图像的应用程序,它将使用应用程序缓存来处理它们的预加载。
有没有办法让我控制这些资产的加载顺序?例如,我想在子页面上加载主页上的大图像/视频之前。我尝试按照我希望它们在应用程序缓存清单中加载的顺序列出文件,但这似乎没有什么区别。
I'm creating an app with a number of videos/large images that will use appcache to handle the preloading of them.
Is there a way for me to control what order those assets get loaded? For example, I would like to load the big image/video on the homepage before the ones on the sub pages. I have tried listing the files in the order I want them to load in the appcache manifest but that didn't seem to make a difference.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以什么顺序下载它们并不重要。Appcache 操作是原子的。在应用程序缓存中对该清单文件的所有内容都可用之前,应用程序缓存中无法提供该清单文件的任何内容。
如果您想分解下载,那么正如 @PaulGrime 建议的那样,拥有多个清单文件。您需要让用户访问每个清单的主机页面,但您应该能够使用隐藏的
iframe
或其他内容来管理它。It doesn't matter what order they're downloaded in. Appcache operations are atomic. Nothing is available from the appcache for a particular manifest file until everything is available from the appcache for that manifest.
If you want to break up the download then, as @PaulGrime suggests, have multiple manifest files. You will need to have the user visit the host page for each manifest but you should be able to manage that with a hidden
iframe
or something.