views:

57

answers:

2

Hello,

I've built a top menu based on superfish, but the amount of displayed items in the menu is huge. And there is also alot of jquery on the top menu. Now to the problem, everytime I load any page that has the menu, the browser(ie7) feels like it looks it locks it self for about 1-2 seconds while the page is being loaded. I'm sure that the top menu is the issue, and I would like to improve the performance of the page.(besides removing the menu and removing the menu items) I've used firebug to see which calls take most of the times, and I the calls are standard jquery or superfish. The top menu is a ascx control. Are they any good ways to let the page load first and the menu later or any other goods ideas to improve the performance?

+1  A: 

Have you tried moving all of your script code (Javascript, jQuery) to the bottom of the page, just before the </html> tag?

Robert Harvey
I moved all the js that related to the top menu down before the </body> and it didnt seem to help at all, does it have to be between the end body and end of the html tag?
Daniel
Before the `</body>` tag is fine, but you need to move *all* of it, not just the stuff related to the menu. The idea is to get the web page to (at least partially) render before the Javascript/jQuery executes.
Robert Harvey
A: 

Have you ever considered loading the menu just once? We had the same kind of problem not long ago where the menu was being reloaded every time the page refresh.

What we did was we minimized page refreshes and force most of our pages to submit/retrieve data via $.ajax.

We only refresh the page when it is absolutely necessary.

Rosdi
As it is now it would take to much time to develop the top menu to load just once :/ But good idea to the next time though
Daniel