简体   繁体   English

为移动网络应用缓存多个 html 页面

[英]caching multiple html pages for mobile web app

I was wondering if there is a way to cache multiple html pages with their individual content.我想知道是否有办法缓存多个html页面及其各自的内容。

The current structure I have for my web app is that i have a index.html file which needs to be cached.我的网络应用程序的当前结构是我有一个需要缓存的index.html文件。 Within this there are pictures and videos that need to be cached.其中有需要缓存的图片和视频。

These pictures then linked to another html file with its own images and video which all need to be cached.然后将这些图片链接到另一个html文件,其中包含所有需要缓存的图像和视频。

I already know all the file locations of the files i want to cache eg images/about/images.jpg images/page/render.jpg images/locations/place.jpg我已经知道我想要缓存的文件的所有文件位置,例如images/about/images.jpg images/page/render.jpg images/locations/place.jpg

The final end product will be distributed to the iOS app store and Android market.最终的最终产品将分发到 iOS 应用程序商店和 Android 市场。 As far as I am aware the way to cache is by using the HTML5 cache manifest and reading through the docs it seems that i am unable to do this from the single index.html rather have to click on each page before it can be cached.据我所知,缓存的方法是使用HTML5缓存清单并阅读文档,似乎我无法从单个index.html执行此操作,而必须在缓存之前单击每个页面。

Is there an alternative?有替代方案吗?

您是要将这些 HTML 文件和相应的资源添加到应用程序内的应用程序中,还是希望在加载到 UIWebview 后缓存它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM