George
George

Reputation: 3817

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

My question is, when you 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?

Upvotes: 2

Views: 2594

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007296

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.

Upvotes: 6

Related Questions