UIWebview taking too much of time to load html content in iOS 7

心不动则不痛 提交于 2019-12-11 07:45:34

问题


Uiwebview taking huge amount of time to load html content in iOS 7. The html content has mathjax library.

Its working good in iOS 5.1 and iOS 6.1.

Can you please help me how to fix this issue?

I am using loadRequest method to load html content into UIWebView.

Thanks, Rahman


回答1:


I have the same problem. After the update to iOS 7, the loadRequest takes about 10 seconds (with iOS 6 less than a second).

My code is like :

NSString *whichWiki = @"http://en.wikipedia.org/wiki/";
NSString *keyword = @"universe";
NSString *siteURLWiki  =[NSString stringWithFormat:@"%@%@",whichWiki, keyword];
[webv loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:siteURLWiki]]];

I tried 2 resolutions I found in Google:

self.webv.dataDetectorTypes = UIDataDetectorTypeNone; // Resolution 1 

self.webv.suppressesIncrementalRendering = YES; // Resolution 2 

but with results of no effects.

Strangely, I have this problem with URL of Wikipedia but NOT WITH URL of Google. I can get URLs of Google search results less than a second.

What's the difference between Wikipedia and Google ???




回答2:


I unchecked the phone numbers detection on UIWebView from Storyboard. It works for me.



来源:https://stackoverflow.com/questions/19034433/uiwebview-taking-too-much-of-time-to-load-html-content-in-ios-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!