a script on this page is causing ie to run slowly

前端 未结 14 2367
野性不改
野性不改 2020-11-29 23:55

The problem is in the title - IE is misbehaving and is saying that there is a script running slowly - FF and Chrome don\'t have this problem.

How can I find the prob

相关标签:
14条回答
  • 2020-11-30 00:32

    @nikmd23 answer is informative..

    My 2 cents here... I had the script warning issue - due to loading a dropdown list items with the help of for loop.

    I referred @Eric Leschinski post in Disabling the long-running-script message in Internet Explorer.

    Refer setTimeout for loading items in a dropdown list to see how I resolved this problem

    0 讨论(0)
  • 2020-11-30 00:34

    For IE, the dialog is based on the # of JS commands processed. See here for info & method to change default: http://support.microsoft.com/kb/175500

    0 讨论(0)
  • 2020-11-30 00:38

    Get yourself a copy of the IBM Page Profiler:

    https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=61d74777-1701-4014-bfc0-96067ed50156

    It's free (always a win). Start it up in the background, give it a few seconds, then refresh the page in IE. Go back to the profiler and it will list out all the resources used on the page and give you detailed profile information - in particular where JavaScript is taking a long time to execute.

    It should be a good start to finding the source of your problem.

    If the script tags are inline, I'd suggest creating a local copy of the file and separating out the script tags to separate files if you can.

    0 讨论(0)
  • 2020-11-30 00:40

    It is usually an infinite loop that causes this. Check your loops and their exit conditions.

    0 讨论(0)
  • 2020-11-30 00:46

    Remove half the code and see if it still happens. If not, it's in the half you removed. Repeat until you figure out what code block is causing the problem.

    0 讨论(0)
  • 2020-11-30 00:46

    you can also check if there is a google analytics javascript include in your page. The bug occured only with IE and once the google code was removed, it worked!

    0 讨论(0)
提交回复
热议问题