更改服务器样式后Android网页未更新
问题描述:
更改样式后Android网页未更新。但它在浏览器中工作。如何在webview中执行相同操作。更改服务器样式后Android网页未更新
我的WebView配置是
webView.getSettings().setAppCacheMaxSize(5 * 1024 * 1024); // 5MB
webView.getSettings().setAppCachePath(getApplicationContext().getCacheDir().getAbsolutePath());
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setAppCacheEnabled(true);
webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT); // load online by default
答
为了禁用缓存使用此设置。
mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
可能会从缓存中displayinig, 清除它,然后再试一次 –