Deploy jQuery using a SharePoint Feature or physical files?

Options and commentary on sharepointblogs.com follow the link above or google it Summary is that modifying the 12 hive directly is easy but unsupported (i.e. Microsoft reserves the right to destroy your environment at will) recommended option on above link is: Use the AdditionalPageHead Delegate Control (my favorite! ) By providing the contents for the AdditionalPageHead Delegate Control that is used by all the out-of-the-box master pages, you can make sure the the jQuery library is loaded by all the SharePoint pages.

The AdditionalPageHead Delegate Control allows multiple controls to provide contents, so it’s a great extensibility scenario. To accomplish this you need to build a web user control (ASCX file), that contains the script tag to load the jQuery library: %@ Control Language="VB" ClassName="jQueryControl" %.

Options and commentary on sharepointblogs.com follow the link above or google it. Summary is that modifying the 12 hive directly is easy but unsupported (i.e. Microsoft reserves the right to destroy your environment at will) recommended option on above link is: Use the AdditionalPageHead Delegate Control (my favorite!) By providing the contents for the AdditionalPageHead Delegate Control that is used by all the out-of-the-box master pages, you can make sure the the jQuery library is loaded by all the SharePoint pages.

The AdditionalPageHead Delegate Control allows multiple controls to provide contents, so it’s a great extensibility scenario. To accomplish this you need to build a web user control (ASCX file), that contains the script tag to load the jQuery library.

1 Modifying Microsoft-provided files in the 12 hive is unsupported, but adding new files (ideally with a WSP) is absolutely supported and essential to SharePoint development... – dahlbyk Aug 27 '09 at 16:18 yep, changing whats there is ill advised, adding to it, is encouraged. – Ric Tokyo Sep 4 '09 at 3:43.

You could also use the Google AJAX Libraries API. By adding some script to your SharePoint master page (for example), any version of jQuery you prefer can be downloaded from Google without any need to deploy the . Js file.

There are also numerous potential speed improvements: Google's jQuery . Js file may already be cached in the users browser (thanks to other sites using this facility) browsers usually only allow a certain number of connections to the same server, so this allows another connection to open in parallel the file is downloaded from the users nearest geographical location (I think) This is an increasingly popular solution that I've heard nothing but good things about. Check it out at: code.google.com/apis/ajaxlibs/.

I'd say it depends on your scenario. If you want to make the jQuery library available for a single site only, using Features is the way to go. If you want to make it globally available however, deploying it to 12 is the way to go.

We deploy it to the 12 hive as part of our free SharePoint Infuser tool, which you may want to consider to deploy JavaScript (inc JQuery) to multiple pages in one go without using any messy changes to masterpages, core. Js etc. Internally it uses the delegate control approach proposed by Ric above, it is just a more generic solution and can be used for all kind of purposes. For details see muhimbi.com/blog/2009/07/massage-sharepo....

For a very powerful example of what this makes possible, see muhimbi.com/blog/2009/07/automatically-a....

I couldn't get the code from sharepointblogs.com to work. I had better luck using this link blogs.msdn.com/b/kaevans/archive/2011/04....

Perhaps you could include the reason you couldn't get it to work and show the differences between the two implementations. – Nick DeVore Apr 29 at 20:14.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions