2017-05-09 57 views
0

更改样式后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 
+1

可能会从缓存中displayinig, 清除它,然后再试一次 –

回答

1

为了禁用缓存使用此设置。

mWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);