I am looking for ways to speed up WebView loading and I came across WebSettings.setBlockNetworkLoads() which is described very briefly in the documentation:
Tell the WebView to block all network load requests.
But it's unclear to me what "all network load requests" mean.
Does it block loading images, like setBlockNetworkImage() does?
Does it block other things? (if so, what does it block?)
According to this code sample it means "preventing WebView from loading external resources over the network".
I interpret this as allowing to load resources locally (cache, memory) but not over the network, not even a URL that you explicitly specify.
So, just as you observed, it will block everything, including images.
I have never used that particular setting but without any further context I would think that it means the WebView .load methods.
WebView.loadData(String data, String mimeType, String encoding);
WebView.loadDataWithBaseURL(String baseUrl, String data, String mimeType, String encoding, String historyUrl);
WebView.loadUrl(String url);
WebView.loadUrl(String url, Map<String, String> extraHeaders);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With