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 an issue where scripts are loading multiple times causing the Welcome menu (by the users name in the header) to have multiple references "My profile" and "My Site"

I have the issue on both the custom master page and the unmodified v4.master inspecting with firebug reveals SP.UI.MyLinksRibbon.js being loaded dynamically multiple times.

<script type="text/javascript" src="/_layouts/SP.UI.MyLinksRibbon.js"></script>
<script type="text/javascript" src="/_layouts/SP.UI.MyLinksRibbon.js"></script>
share|improve this question
Still no answer to this... – Ben Shoemate May 1 '12 at 0:14

This problem on occurs when images are loaded into a custom webpart via a javascript template. I think the scriptmanager:

<asp:ScriptManager id="ScriptManager" runat="server"  
     EnablePageMethods="false" EnablePartialRendering="true"
     EnableScriptLocalization="true" />

This includes a call to ExecuteOrDelayUntilScriptLoaded(_myLinksRibbonLoad2, 'SP.Ribbon.js'); The js returns a "loaded" response to the function for each image which causes it to fire each time, loading the script into the header.

share|improve this answer
I tried loading the images only after the page loads with a jquery ready block. The problem still occurs. Something in the load event is trigging the script to get loaded muliple times. – Ben Shoemate May 1 '12 at 0:15

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.