SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a share point site i noticed the menu loads slow.its a customized menu based on a list and jquery.I load the script on my masterpages I would prefer this menu to load last after all the other script has loaded. I read about scriptlink vs traditional script tag but not sure if this will help. Any tips,ideas and resources would be appreciated. Cheers

share|improve this question

"If you aren't dynamically loading scripts or marking them as defer or async, then scripts are loaded in the order encountered in the page. It doesn't matter whether it's an external script or an inline script - they are executed in the order they are encountered in the page. Inline scripts that come after external scripts have are held until all external scripts that came before them have loaded and run.

Async scripts (regardless of how they are specified as async) load and run in an unpredictable order. The browser loads them in parallel and it is free to run them in whatever order it wants.

There is no predictable order among multiple async things. If one needed a predictable order, then it would have to be coded in by registering for load notifications from the async scripts and manually sequencing javascript calls when the appropriate things are loaded.

When a script tag is inserted dynamically, how the execution order behaves will depend upon the browser. You can see how Firefox behaves in this reference article. In a nutshell, the newer versions of Firefox default a dynamically added script tag to async unless the script tag has been set otherwise."

From this forum

Hope this helps!

[EDIT] Based on your comment:

  1. If you are looking for the SPLongOperation. Please have a look here



share|improve this answer
Thanks Anuja. How about showing a loading... button and then after the data is loaded append to element. cheers – naijacoder Nov 5 '12 at 12:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.