Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will WebView cache persist between application runs?

Tags:

android

I have a WebView. I'm not quite sure how caching works for it. Ideally I'd like to load a webpage from the network once (images included), then from then on only ever load it from the local cache. I'm not sure if we have this level of control over webview. Will it at some point just auto-clear the cache? How could I tell? I need to be sure that it's really keeping the page cached between different runs of my application.

http://developer.android.com/reference/android/webkit/WebSettings.html

the cache modes there don't seem to specify if the cache persists between runs of the application or not?

Thanks

like image 979
user246114 Avatar asked Nov 15 '22 12:11

user246114


1 Answers

Check out the cache folder in your apk's data directory

in a command prompt run

adb shell
#cd /data/data/yourpackage
#ls
<<you should see a cache directory>>
like image 114
Pentium10 Avatar answered Jan 05 '23 17:01

Pentium10