2017-05-09 52 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);