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

Pagespeed defer loading recommendation

9 Answers 302 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
SK
Top achievements
Rank 1
SK asked on 11 Aug 2012, 07:08 PM
Hello,
 I have a ASP.NET Master page set up, with RadScriptManager as follows:
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
            OnAsyncPostBackError="RadScriptManager1_AsyncPostBackError"
            AsyncPostBackTimeout="180" CompositeScript-ScriptMode="Release" OutputCompression="AutoDetect" CdnSettings-TelerikCdn="Enabled"
            ScriptMode="Release">
            <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" />
                <asp:ScriptReference Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    Name="MicrosoftAjax.js" Path="https://ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js" />
            </Scripts>
        </telerik:RadScriptManager>

On running the Google PageSpeed tool, I get the recommendation to "Defer parsing of javascript during initial page load".

1.2MiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.
What is the recommended way to accomplish this? Techniques shown in other sites seem to involve dynamically creating a script element when the page has loaded etc. But how do  I do this with the script manager?

Thanks in advance,


9 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 14 Aug 2012, 12:31 PM
Hello Sajit,

I downloaded the tool and tested a page with our controls on it and got the same warning. I read the detailed specification about Defer loading of JavaScript. In order to pass that validation we need to make many breaking changes to our code which is not possible. I am afraid that it is not possible to achieve this with RadScriptManager.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
SK
Top achievements
Rank 1
answered on 06 Sep 2012, 03:35 AM
Hi,
 Could this be added as a feature request or a fix ?

 I have since tested with two other tools (YSlow and Dynatrace AJAX) and both have reported the downloading and processing of the scripts before the DOM gets loaded, as Priority 1 issues to be fixed for my website to be considered performant.

Thanks,
0
Peter Filipov
Telerik team
answered on 06 Sep 2012, 07:53 AM
Hi Sajit,

We are going to research it further and if it is possible to change the order of the scripts loading we are going to create a PITS item to vote for it.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Benjamin
Top achievements
Rank 1
answered on 07 Jan 2014, 01:29 PM
Peter, it has been a year and a half since this issue was raised....can you provide us with an update?  Have you added support for deferred JavaScript loading?  It should just mean rewriting your script tags, which you already do to support CDN versus local scripts.
0
Peter Filipov
Telerik team
answered on 10 Jan 2014, 09:41 AM
Hi Benjamin,

The request is logged here and you could track its status. Please vote for it to raise its priority. We haven't done any research on the topic because the specification about Defer loading of JavaScript showed us some problems and breaking changes that we should make. Applying only the defer attribute seems more possible. Thank you for your feedback.

Regards,
Peter Filipov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Marc
Top achievements
Rank 1
answered on 22 Apr 2014, 05:07 PM
Any update on this?
0
Peter Filipov
Telerik team
answered on 25 Apr 2014, 05:58 AM
Hi Marc,

We have decided not to start this due to tasks with higher priority. Another reason is that many controls will be rendered partially and this will cause visual glitches until the javascript is executed. To increase the task's priority please vote for it in our feedback portal.

Regards,
Peter Filipov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Prashant
Top achievements
Rank 1
answered on 24 Mar 2017, 11:02 AM

Hi Peter,

Any Update on above query ?

 

Thanks

0
Marin Bratanov
Telerik team
answered on 28 Mar 2017, 03:45 PM

Hi Prashant,

As Peter said, you can use the public item to vote and monitor the status of this idea: http://feedback.telerik.com/Project/108/Feedback/Details/98226-add-defer-loading-of-the-javascript-files. As the page shows, it has not been implemented yet.

Regards,

Marin Bratanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ScriptManager and StyleSheetManager
Asked by
SK
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
SK
Top achievements
Rank 1
Benjamin
Top achievements
Rank 1
Marc
Top achievements
Rank 1
Prashant
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or