开发者

Android Webview Cache, Not Caching Javascript DOM changes?

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜