Hi I would like to know if ther开发者_开发知识库e is a way to make the Android Webview cache changes made to the DOM of the loaded page so that when I go back to it, the previously loaded changes remain.
An example would be I'm on page A, call javascript that adds more html content (from an ajax call or w/e), and then I go to Page B. When I hit the back button to go back to page A, page A only displays what the original page load displays.
Is there any quick way around this?
Try this
WebView view = new WebView(this);
view.getSettings().setJavaScriptEnabled(true);
view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
view.clearCache(false);
精彩评论