Mobile Safari on iOS crashes on big pages

后端 未结 7 1254
感情败类
感情败类 2020-11-30 22:49

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

I get the same problem on both iPhone and

7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 22:59

    I had a similar problem, the web page worked like a charm on android devices and crashed on IOS (iphone and simulator).

    After a lot of research (using also the ios_webkit_debug_proxy) I found that the problem was connected to the jQuery ready event.

    Adding a little timeout solved the problem. My application was also using iframes.

    $(document).ready(function () {
        window.setTimeout(function () { ready(); }, 10);
    });
    

提交回复
热议问题