webview訪問網站,會有緩存
Android的源碼:Cocos2dxWebViewHelper.java
public static void loadUrl(final int index, final String url, final boolean cleanCachedData) { sCocos2dxActivity.runOnUiThread(new Runnable() { @Override public void run() { Cocos2dxWebView webView = webViews.get(index); if (webView != null) { webView.getSettings().setCacheMode(cleanCachedData ? WebSettings.LOAD_NO_CACHE : WebSettings.LOAD_DEFAULT); webView.loadUrl(url); } } }); }
有緩存的好處是下一次 進來會比較快
這樣做:
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE );
參考文檔:
http://blog.csdn.net/typename/article/details/39030091
保存緩存的時候需要做網站的人,每次有新圖片的時候最好換一下圖片
參考文檔