In my application, I have a web view in which I first download any site, for example www.google.com.
Later at the touch of a button I want to clear this webview for which I am doing
webview.loadUrl("about:blank");
But this does not clear my webview, it continues to display google.com
I tried to reinitialize the webview as
webview = new WebView(this); webview.loadUrl("about:blank");
I also tried
webview.clearHistory(); webview.loadUrl("about:blank");
But I got the same results, the web view displays google.com
How to clear web browsing? Please suggest. Thanks.
Edit:
On the other hand, before downloading google.com if I do
webview.loadUrl("about:blank");
loads a blank web page.
android webview
Zeba
source share