This is a migrated thread and some comments may be shown as answers.

Force core and other scripts to the bottom of HTML markup

1 Answer 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 17 Jun 2010, 04:19 PM

I'm trialing the AJAX toolkit and it's fantastic.

I have coded a page that uses a RadRotator, a few RadComboBoxes, a RadStyleSheetManager and a RadScriptManager.

I have placed the RadStyleSheetManager and RadScriptManager just before the closing Form tag hoping this would prioritise the page's content before Telerik's scripting for SEO purposes.

Unfortunately, when the page source is viewed in a browser the following scripts are called at the top of the page, immediately after the opening Form tag.

<script src="/WebResource.axd?...lots of code..." type="text/javascript"></script>
<script src="/Telerik.Web.UI.WebResource.axd?..." type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/Core.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/jQuery.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/jQueryPlugins.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/Animation/AnimationScripts.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Rotator/RadRotator.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/Common/Navigation/NavigationScripts.js" type="text/javascript"></script>
<script src="http://aspnet-scripts.telerikstatic.com/ajaxz/2010.1.309/ComboBox/RadComboBoxScripts.js" type="text/javascript"></script>
<script src="/Telerik.Web.UI.WebResource.axd?...lots of code..." type="text/javascript"></script>

How do I force these scripts to the bottom of the page? The RadStyleSheetManager's attributes are set to OutputCompression="AutoDetect" and EnableStyleSheetCombine="true". The RadScriptManager's attributes are set to EnableScriptCombine="true", OutputCompression="AutoDetect" and ScriptMode="Release". I saw something on the Telerik site about a ScriptRegistrar - which looked promising - but can't seem to find it in the VS toolbox or in attributes belonging to the script manager.

Any help would be appreciated!

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 23 Jun 2010, 12:29 PM
Hello Dave,

Unfortunately this is how the base implementation (ScriptManager) works and we can't override the position of the scripts.

Also be sure to take a look at our Top Performance page for performance-related tips.

Regards,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Dave
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or