I am wondering if someone could provide some insight and direction.... For performance reasons I am trying to use a composite script & I am wanting to point my users to use Google's jQuery version so my end users don't have to download it again.
I followed your instructions to make RadControls use an external jQuery. I then tried to 'compositescript' the rest of my external JS references. As folows:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="true">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" Path="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryPlugins.js" />
</Scripts>
<CompositeScript>
<Scripts>
<asp:ScriptReference Path="/js/some.jquery.plugin.js" />
<asp:ScriptReference Path="/js/another.jquery.plugin.js" />
</Scripts>
</CompositeScript>
</asp:ScriptManager>
This fails, because SM renders the compositeScript first which means jQuery isn't loaded yet and the plugins fail. I can't figure out any way around this....
Is there a solution?? Or do you have other tips to make this run better. I don't have RadControls on every page of this website, but do use jQuery on every page. I am keen on the compositeScript because I have many many plugins and UI files. For now I'm resorting to manually combining and minifying.
Any workaround, tips or suggestions on how to tune this the best would be appreciated.
I followed your instructions to make RadControls use an external jQuery. I then tried to 'compositescript' the rest of my external JS references. As folows:
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableCdn="true">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" Path="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryPlugins.js" />
</Scripts>
<CompositeScript>
<Scripts>
<asp:ScriptReference Path="/js/some.jquery.plugin.js" />
<asp:ScriptReference Path="/js/another.jquery.plugin.js" />
</Scripts>
</CompositeScript>
</asp:ScriptManager>
Is there a solution?? Or do you have other tips to make this run better. I don't have RadControls on every page of this website, but do use jQuery on every page. I am keen on the compositeScript because I have many many plugins and UI files. For now I'm resorting to manually combining and minifying.
Any workaround, tips or suggestions on how to tune this the best would be appreciated.