Answer the question
In order to leave comments, you need to log in
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
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
Alerts are unproductive, you can log to the console and see where it ends
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question