views:

1008

answers:

3

One of the web pages on our site is extremely long. Although the page itself does not call any javascript or jquery functions, its base page registers the JQuery source script (jquery-1.2.6.js) and this seems to cause IE7 to display the "A script on this page is causing Internet Explorer to run slowly." message when you click on a link that will navigate you away from this long page.

Removing the registration of the jquery source script makes the problem go away, however there are other controls on the page that require jquery so this is not really an option.

Any ideas why this happens and is there any way around it? Thanks.

+1  A: 

As a crude workaround, could you unregister the script on the child page?

Did you try moving the script reference to the bottom of the page?

EndangeredMassa
A: 

It looks like when you click on a link the JQuery source functions do some processing involving an array of the elements on the page. When the page, and therefore the array, is very big it triggers the IE warning.

I guess I'll have to live with it or persuade my business to drop the option that builds the enourmous page.

Si Keep
how big exactly is this page/array? And what are you trying to do because maybe there's a way to unroll the loop
annakata
A: 

If it is worth it to you. you could try to optimize the jquery calls. there are some simple techniques that could really improve performance on large pages.

//cache any jQuery objects that are used frequently
$myObj = $(".someClass");
...

Also think that this is still relevant: Optimizing DOM Traversal

Ariel