Calculate time a web page will take to load into UIWebView
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.
精彩评论