V
V
voidMan2012-11-23 11:27:24
JavaScript
voidMan, 2012-11-23 11:27:24

Debugging a script in Safari that hangs the browser tightly?

There is a fairly large visited site. Clients began to complain that in Safari 6 under the poppy on some pages the browser hangs tightly. Other browsers don't have this problem.
The web inspector at the moment of "thoughtfulness" is completely incapacitated. Process Web Content 100% otzhiraet and hangs. Is there a way to get more information on what Safari stumbles on?
Or does it only remain to disable scripts one by one and put alerts on each line?
The same problem appears on some versions of ios in safari.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
voidMan, 2012-11-25
@voidMan

Suddenly it will come in handy for someone ...
It turned out that Safari works with arrays in its own way, for example, such code causes the array to be filled from 0 to 27956 with the value “undefined”. What causes terrible brakes (5-10 minutes of thought is quite normal...)
promo_data = new Array();
promo_data['27957'] = '27957';
var promo_data2 = promo_data
If you change "promo_data = new Array()" to "promo_data = {}", everything works fast

S
Stepanow, 2012-11-23
@Stepanow

Alerts are unproductive, you can log to the console and see where it ends

E
egorinsk, 2012-11-23
@egorinsk

Somewhere in Javascript there is an infinite loop

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question