UIWebview花费太多时间在iOS 7中加载html内容 [英] UIWebview taking too much of time to load html content in iOS 7

查看:72
本文介绍了UIWebview花费太多时间在iOS 7中加载html内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Uiwebview花费大量时间在iOS 7中加载html内容.html内容具有mathjax库.

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

在iOS 5.1和iOS 6.1中运行良好.

Its working good in iOS 5.1 and iOS 6.1.

您能帮我解决此问题吗?

Can you please help me how to fix this issue?

我正在使用loadRequest方法将html内容加载到UIWebView中.

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

谢谢, 拉曼(Rahman)

Thanks, Rahman

推荐答案

我有同样的问题.在更新到iOS 7之后,loadRequest大约需要10秒钟(iOS 6不到一秒钟).

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

我的代码就像:

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

我尝试了2种在Google中找到的解决方案:

I tried 2 resolutions I found in Google:

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

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

,但没有效果.

奇怪的是,我在Wikipedia的URL上遇到了这个问题,但在Google的URL上却没有.我可以在不到一秒钟的时间内获得Google搜索结果的网址.

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.

维基百科和Google之间有什么区别?

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

这篇关于UIWebview花费太多时间在iOS 7中加载html内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆