When I'm trying to load a web page I'm using this part of code:
I could see a delay from 1-3 seconds before to show the page even if I change the url.
That delay is normal?
I tried with both options:
Code Block let myURL = URL(string:"https://www.apple.com") let myRequest = URLRequest(url: myURL!) print(Date())/*Start time 11:47:28*/ self.myWV.load(myRequest)
I could see a delay from 1-3 seconds before to show the page even if I change the url.
Code Block func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { print(Date())/*End time 11:47:30*/ }
That delay is normal?
I tried with both options:
Added a WKWebView in the Storyboard
Added a WKWebView programmatically.
On my Mac mini connected with 100Mbps ethernet cable to Giga-bps fiber-based global network.
I haven't measured to sub-seconds, but I think it took more than one second.
1-3 seconds would not be a big delay, considering what happens behind WKWebView.
The value will change depending on many things, for example, DNS cache.
If you run your code on a well-trained actual device, it may be shorter.
Code Block 2020-11-24 23:00:01 +0000 2020-11-24 23:00:02 +0000
I haven't measured to sub-seconds, but I think it took more than one second.
1-3 seconds would not be a big delay, considering what happens behind WKWebView.
The value will change depending on many things, for example, DNS cache.
If you run your code on a well-trained actual device, it may be shorter.
Quite normal.That delay is normal?