0

I use a cordova libry that uses Android native website.websettings.setAppCacheEnabled(). It has been removed from API 33 and the libry stop to work. Is there any other way to replace this method?

1 Answers1

0

https://web.dev/appcache-removal/#android-webviews

Some developers of Android applications use Chrome WebView to display web content, and might also use AppCache. However, it's not possible to enable an origin trial for a WebView. In light of that, Chrome WebView will support AppCache without an origin trial until the final removal takes place, expected in Chrome 90.

But take a look at: https://developer.android.com/reference/android/webkit/WebSettings

Cache Mode:

https://developer.android.com/reference/android/webkit/WebSettings#setCacheMode(int)

Overrides the way the cache is used. The way the cache is used is based on the navigation type. For a normal page load, the cache is checked and content is re-validated as needed. When navigating back, content is not revalidated, instead the content is just retrieved from the cache. This method allows the client to override this behavior by specifying one of LOAD_DEFAULT, LOAD_CACHE_ELSE_NETWORK, LOAD_NO_CACHE or LOAD_CACHE_ONLY. The default value is LOAD_DEFAULT.

Also someone else asked similar here: Websettings.SetAppCacheEnabled deprecated, what to use instead?

Blundell
  • 75,855
  • 30
  • 208
  • 233