I have a webview that loads an external webpage. I want to implement my own caching mechanism, so there is no need to load resources such as css, js and images. I have already tried these two methods:
- override method
shouldInterceptRequest WebViewClient
That way I can provide my local resource to webview. Unable to retrieve the resource that is loading the webview. Real loading occurs after the method is completed. According to the documentation, the resource is loaded only if this method returns null .
- override
onLoadResource method for WebViewClient
That way I can get the URL of the downloaded resource and nothing more ...
Thanks for the help!
source share