Following the problem solved last time, WkWebView intercepts and replaces local audio, images. New problem: background image, audio, etc. cannot be loaded the first time, but will be loaded the second time. Here’s the solution
- Loading an untrusted HTTPS method using WKWebView also does not work.
- Considering whether token is not included, it is not.
- Check the link through Charles, the first time can not intercept the image link, the second time is ok. Could this be the reason for thinking that links are HTTPS, but resources are ALL HTTP?
- I looked for the problem on the Internet, and found that the WebView HTTPS page quoted HTTP resources. I found that it was android, but I did not find a solution on Apple.
- UIWebView supports cross domain, WKWebView does not!! Find the cause of the problem has been found. WKWebView does not support cross-domain links, so I changed the link to HTTPS in the background.
Reflection: The second time can be loaded, I predict because the first time can not load the HTTP resource link, but the resource has been cached, the second time uses the form of data stream directly, so it can be loaded.