NextAndroider
Lurker
I am working on app with single Fragment and Webview. I have one Webview, created and loaded in a fragment. Here are my caching permissions:
websettings.setAppCachePath(getContext().getCacheDir().toString());
websettings.setAppCacheEnabled(true);
websettings.setCacheMode(WebSettings.LOAD_DEFAULT);
websettings.setAppCacheEnabled(true);
Documentation is not clear if this caching will work if WebView is recreated? Do I have to keep the WebView itself in memory for caching to work? Everytime, I reload a new page in the fragment the cache of the old page is gone. Webview is a view so I don't see how I can keep these around for long. yet I would like to cache and not go to network for most recent page visits.
websettings.setAppCachePath(getContext().getCacheDir().toString());
websettings.setAppCacheEnabled(true);
websettings.setCacheMode(WebSettings.LOAD_DEFAULT);
websettings.setAppCacheEnabled(true);
Documentation is not clear if this caching will work if WebView is recreated? Do I have to keep the WebView itself in memory for caching to work? Everytime, I reload a new page in the fragment the cache of the old page is gone. Webview is a view so I don't see how I can keep these around for long. yet I would like to cache and not go to network for most recent page visits.
Last edited: