Answer the question
In order to leave comments, you need to log in
How to disable cache WebView?
Good afternoon!
In my project I am using a WebView to display information. Here is a code snippet:
String mainBody = getIntent().getStringExtra(EXTRA_MAIN_BODY_TEACH);
WebView webView = findViewById(R.id.wv_teach_info);
webView.getSettings().setAppCacheEnabled(false);
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
webView.loadDataWithBaseURL(null, mainBody, "text/html", "UTF-8", null);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question