开发者

Calculate time a web page will take to load into UIWebView

开发者 https://www.devze.com 2023-03-07 12:59 出处:网络
How can we calculate the time that a web page will take 开发者_JS百科to load into a UIWebView? If you suggest looking at the HTTP content-length header, then how can this be done when the HTTP header

How can we calculate the time that a web page will take 开发者_JS百科to load into a UIWebView? If you suggest looking at the HTTP content-length header, then how can this be done when the HTTP header doesn't have content-length. I want to make a progress bar tracking the loading time.


By definition, you don't know when the HTTP stream will end if you don't have a content length. You can detect when a document finishes loading using the UIWebView notifications. However, without content length, you can't have a progress bar.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号