Android Question Webview refresh

hibrid0

Active Member
Licensed User
Longtime User
Hi I want to refresh a webview.

The webview load html file from file.dirinternal, the user select a picture, the picture as the logo, I copied the picture to the file.dirinternal.

I try to webview.invalidate and next webview.loadhtml, bit the images logo is the same.
Try to remove the webview, re add with activity.addview and webview.loadhtml.,same result, the logo image is the same.

Try to set cache mode off.

If I close the app and reopen, the logo take the change.
 

JohnC

Expert
Licensed User
Longtime User
If you use WebViewSettings library, there are a couple of different cache modes:

B4X:
wvs.setCacheMode(wv,"LOAD_DEFAULT")       
wvs.setCacheMode(wv,"LOAD_NORMAL")       
wvs.setCacheMode(wv,"LOAD_NO_CACHE")
wvs.setCacheMode(wv,"LOAD_CACHE_ONLY")   
wvs.setCacheMode(wv,"LOAD_CACHE_ELSE_NETWORK")

Did you try them all?
 
Upvote 0

hibrid0

Active Member
Licensed User
Longtime User
If you use WebViewSettings library, there are a couple of different cache modes:

B4X:
wvs.setCacheMode(wv,"LOAD_DEFAULT")      
wvs.setCacheMode(wv,"LOAD_NORMAL")      
wvs.setCacheMode(wv,"LOAD_NO_CACHE")
wvs.setCacheMode(wv,"LOAD_CACHE_ONLY")  
wvs.setCacheMode(wv,"LOAD_CACHE_ELSE_NETWORK")

Did you try them all?
Thanks for your reply, I try with Load_no_cache
 
Upvote 0
Top