iOS上的移动Safari在大页面上崩溃 [英] Mobile Safari on iOS crashes on big pages

查看:255
本文介绍了iOS上的移动Safari在大页面上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个问题,当页面太大时,使用jQuery加载和操作DOM时,Mobile Safari崩溃。

I have a problem where Mobile Safari crashes when loading and manipulating the DOM with jQuery when the pages get too big.

我在iPhone和iPad。

I get the same problem on both iPhone and iPad.

如何解决行动版网页找出错误的最佳方法是什么?是否有任何已知的问题可能会导致Mobile Safari崩溃?

What are the best way to troubleshoot mobile pages to find the error? Are there any known problems that might crash Mobile Safari?

推荐答案

我实际上发现了问题。它不是像我想的JS,但与CSS。我添加了类,使一个CSS转换,淡出一些元素。对于匿名用户,这些元素具有 display:none; ,并且可能从未运行过不透明度转换。

I actually found the problem. It wasn't with JS as I thought, but with the CSS. I added class to make a CSS transition to fade in some elements. For anonymous users these elements had display: none; and probably never ran the opacity transition.

奇怪的是转换恰好在两个元素上。

The strange thing is that the transitions was on exactly two elements. So why would this only crash on long threads with 100+ comments?

所以底线是:-webkit-transition崩溃了移动safari上的页面。

So the bottom line is: -webkit-transition crashed the page on mobile safari.

这篇关于iOS上的移动Safari在大页面上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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