flutter_inappwebview (former flutter_inappbrowser)
- Has parameter
cacheEnabled
. Default value is true. cacheEnabled
sets whether the WebView should use browser caching.
flutter_webview_plugin community version
- Has parameter
appCacheEnabled
to enable cache. - Example:
WebviewScaffold(
key: _scaffoldKey,
url: widget.url,
clearCache: true,
appCacheEnabled: true,
);
webview_flutter official version
- Do not provide parameter, you can check with Android Source code https://github.com/flutter/plugins/blob/master/packages/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java
- Default cache mode depend on
iOS WKWebView
andAndroid
WebView
- Default cache mode of
Android WebView
isLOAD_DEFAULT
. https://developer.android.com/reference/android/webkit/WebSettings#LOAD_DEFAULT - Default cache usage mode. If the navigation type doesn't impose any specific behavior, use cached resources when they are available and not expired, otherwise load resources from the network.