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

Further reduce WebResource.axd calls

2 Answers 224 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
TonyG
Top achievements
Rank 1
TonyG asked on 22 Oct 2010, 11:07 PM
Even with a script manager I'm still getting WebResource.axd requests for js files that include:
  • function WebForm_FindFirstFocusableChild(control)
  • function WebForm_PostBackOptions
Any idea how I can get those documents handled by the script manager?

Thanks!

2 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 03 Nov 2010, 02:27 PM
Hi TonyG,

These 'archaic' scripts are served separately and are not registered through the ScriptManager, so we cannot combine them.

In ASP.NET 4.0 this has been patched to some extent so the least you can do is to run your site under ASP.NET 4.0 and explicitly register the scripts as one composite in the (Rad)ScriptManager on the page, e.g.:
<CompositeScript>
    <Scripts>
        <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" />
        <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" />
    </Scripts>
</CompositeScript>

Now you will get one request instead of two for the two scripts. If you use RadScriptManager with script combining you will get two requests in total - one for the scripts above and one for all other combined scripts.

I hope this helps.

Best wishes,
Simon
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
0
msigman
Top achievements
Rank 2
answered on 17 Feb 2011, 03:18 AM
I wanted to follow up that I successfully used Simon's recommendation to reduce my HTTP requests on my pages by at least 1, sometimes up to 3 requests as verified by HttpWatch.

Also if anyone is wondering the format is as follows:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="true" LoadScriptsBeforeUI="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" /> 
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />            </Scripts
    <CompositeScript>
        <Scripts>
            <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" />
            <asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" />
        </Scripts>
    </CompositeScript>
    <Services>  
        <asp:ServiceReference Path="~/WebServices/SessionService.asmx" />  
    </Services>  
</telerik:RadScriptManager>
Tags
ScriptManager and StyleSheetManager
Asked by
TonyG
Top achievements
Rank 1
Answers by
Simon
Telerik team
msigman
Top achievements
Rank 2
Share this question
or