开发者

Android: when in web view: Does the browser cache the previous page?

My question is, when yo开发者_Python百科u are in a webView, and you have gone through several pages.

You want to go back. Is the last page you have been to cached, so that you would not need internet connection to go back?


AFAIK, by default, WebView works like a regular Web browser. While it caches things, it still makes requests (with If-Modified-Since and related HTTP headers) to ensure that it has the latest editions. Also, WebView presumably honors other cache control directives sent by the server, perhaps to not cache certain things.

You can use getSettings().setCacheMode() on a WebView to modify this behavior somewhat.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜