saadnib
saadnib

Reputation: 11145

Calculate time a web page will take to load into UIWebView

How can we calculate the time that a web page will take 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.

Upvotes: 1

Views: 534

Answers (1)

Michael Petrov
Michael Petrov

Reputation: 2317

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.

Upvotes: 2

Related Questions