UIWebView is very slow

I am creating my own RSS feed reader with feed view enabled (UIWebView).

Using the following code, when a view containing WebUIView is loaded, it takes about 6 seconds before something displays to the user:

-(void)viewDidLoad{
 [super viewDidLoad];

 NSString *urlString = [[[self appDelegate] currentlySelectedBlogItem]linkUrl]; 
 NSURL *url = [NSURL URLWithString:urlString];
 NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];

 [_webview loadRequest:requestObj];
 [_webview setScalesPageToFit:YES];
 }

Any ideas why UIWebView is so slow?

I checked the url is clean and expected. I am building for iOS 3.0 as a basic deployment target.

+3
source share
2 answers

It seems that the built-in browser from UIWebView is not optimized like MobileSafari.

+3
source

It helps me:

[webView setDataDetectorTypes: UIDataDetectorTypeNone];    

But the statement about jit for JS in WebView is also true - mobile safari is faster.

+2
source

Source: https://habr.com/ru/post/1782540/


All Articles