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

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

问题描述

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

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.

奇怪的是,过渡恰好在两个元素上.那么为什么这只会在 100 多条评论的长线程上崩溃?

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 上的 Mobile Safari 在大页面上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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