0

I have a UIWebView in an iPhone application I am building. It's job is to load up a URL. The code I use is:

NSURL *url = [NSURL URLWithString:providedURL];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];

This is in viewDidLoad.

I have noticed that it takes around 18 seconds for the page to load in my app....but when using Safari it takes 5-8 seconds. Has anyone run into this issue before? Does it have anything to do with how I'm forming my request?

Ry.
  • 173
  • 3
  • 13

1 Answers1

0

It is likely because Safari has cached the resources of the site already. A basic UIWebView does not do any caching by itself. You'll have to implement that yourself. See a question about that here:

How to cache content in UIWebView for faster loading later on?

Community
  • 1
  • 1
Mike
  • 8,853
  • 3
  • 35
  • 44