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
"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.
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: