I searched a lot but couldn’t find the way to measure web page loading time with iOS.
In the app, I want to show certain page loading time.. Is it possible with iOS sdk or third party sdk?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can load a URL request and use NSDate to see how long it took…lets assume you use a UIWebView to show your page so to measure the loading time i would capture the time when the URL is requested and then in the delegate methods – (void)webViewDidFinishLoad:(UIWebView *)webView capture the time again and take the difference, for example
If you want to do this without the UIWebView you can just use NSURLRequest/NSURLConnection… you can do the following (I will do it synchrnosly you can also do it async)