Sdílet prostřednictvím


WebSettings.SetAppCacheEnabled(Boolean) Method

Definition

Sets whether the Application Caches API should be enabled.

[Android.Runtime.Register("setAppCacheEnabled", "(Z)V", "GetSetAppCacheEnabled_ZHandler")]
public abstract void SetAppCacheEnabled (bool flag);
[<Android.Runtime.Register("setAppCacheEnabled", "(Z)V", "GetSetAppCacheEnabled_ZHandler")>]
abstract member SetAppCacheEnabled : bool -> unit

Parameters

flag
Boolean

true if the WebView should enable Application Caches

Attributes

Remarks

Sets whether the Application Caches API should be enabled. The default is false. Note that in order for the Application Caches API to be enabled, a valid database path must also be supplied to #setAppCachePath.

This member is deprecated. The Application Cache API is deprecated and this method will become a no-op on all Android versions once support is removed in Chromium. Consider using Service Workers instead. See https://web.dev/appcache-removal/ for more information.

Java documentation for android.webkit.WebSettings.setAppCacheEnabled(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to