如何在缓存网页的WebView不打开呢? [英] How to cache pages in webview without opening them?

查看:117
本文介绍了如何在缓存网页的WebView不打开呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这就是这件事,我想的WebView下载和当打开应用程序缓存多个页面,使他们保存供脱机使用。他们只打算在每个几KB而且也只会是其中约10,我们谈论小于100KB都在一起,但我想,以确保所有的信息是最新的,当应用程序被打开。我会怎么做去这样做呢?只是地方开始将是很好的。

So that's about it, I want webview to download and cache multiple pages when the app is opened so that they're saved for offline use. They're only going to be a few kilobytes each and there's only going to be about 10 of them, we're talking less than 100kb all together, but I want to make sure all the info is up to date when the app is open. How would I do go about doing this? Just somewhere to start would be nice.

编辑:假设在第一次互联网连接,但随后该停止,没有互联网缓存完成后,

assume internet connection at first, but then this stops and there's no internet after the caching is complete.

推荐答案

您可以创建一个web视图,并使其不可见的,在这里加载的资源。

You can create a WebView and make it not visible and load the resources here.

这篇关于如何在缓存网页的WebView不打开呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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