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 question regarding the additional page head delegate control. Basically this delegate controls helps to register some scripts in my case.

But i have 2 different additional page head delegate controls for special reason, now in both of this delegates I want to register a JQuery script.

So for example if one feature is activated JQuery will be registered, if another feature is activated the JQuery will be registered again, but now, when both feature activated i want to have same effect. So in case when 2 features activated will there be 2 JQuery scripts registrations or only one? And how do i best do it, so that it always is one script that is registered.

Thanks in advance

PS: both delegates will contain other custom scripts registrations

share|improve this question
up vote 2 down vote accepted

Try using ScriptLink

<sharepoint:scriptlink defer="false " id="SPScriptLink " localizable="false " name="jquery-x.x.x.js " runat="server"></sharepoint:scriptlink> 


<SharePoint:Scriptlink runat="server" Name="~sitecollection/Style Library/[YOUR SITE]/js/jquery.js" Language="javascript" />

The ScriptLink control ensures that the script is loaded only once and will also ensure that other dependencies have been loaded first

share|improve this answer
So basically if i have 2 JQueries registered from additional page head, only 1 script will be regsitered on the page yes? – Shkipper Nov 13 '13 at 8:52
Yes thats right – Remko Nov 13 '13 at 8:59

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.