开发者

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

开发者 https://www.devze.com 2023-01-18 09:45 出处:网络
My question is, when yo开发者_Python百科u are ina webView, and you have gone through several pages.

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

精彩评论

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