Wednesday 22 April 2015

Clearing/Deleting Webview's Web Storage in Android

Sometimes our webview load's previously loaded url when we are saving cookies and maintaining cache etc.now what happens is webview maintains web storage for these loaded pages.In order to load new url everytime we've to clear/delete this web storage.

Now in order to do this we've to write this code :


WebStorage webStorage = WebStorage.getInstance();

webStorage.deleteAllData();

wvAppWebView.reload();  
 
 wvAppWebView.loadUrl(URL);

No comments:

Post a Comment