I have a Webview in my android project that opens the Instagram URL in a dialog fragment. I want that everytime the fragment is closed to delete all cashe and information collected by the webview and when I restart it the webview will start fresh with no user information. I have tried EVERYTHING - nothing works and all documentations about it are very old and not helpful. thanks!
Asked
Active
Viewed 95 times
0
-
https://stackoverflow.com/questions/2465432/android-webview-completely-clear-the-cache – Ganesh Kanna Jul 12 '18 at 11:28
-
I tried this : WebView obj; obj.clearCache(true); and nothing happends - I put it on the onDestroy() method of the dialog fragment. – Alon Shlider Jul 12 '18 at 11:31
1 Answers
0
UPDATE: after 2 days of heavy digging into this issue I came up with the idea to set the Instagram log-off URL within the onDestroy() method and it magiclly worked. If anyone has any use of it, the url for loggin off is https://instagram.com/accounts/logout

Alon Shlider
- 1,187
- 1
- 16
- 46