Clearing all cached items created by a WebView?

后端 未结 3 1464
借酒劲吻你
借酒劲吻你 2021-01-05 01:16

I\'ve got a WebView in my app. When the user logs out of my app, I\'d like to delete all cached resources the WebView may have created. Looking at an emulator, I see the fol

3条回答
  •  -上瘾入骨i
    2021-01-05 01:53

    Only posting here because commenting can be ugly

    clearCache() will work because:

    From the doc:

    Clear the resource cache. Note that the cache is per-application, so this will clear the cache for all WebViews used.

提交回复
热议问题