Pagespeed defer loading recommendation

8 posts, 0 answers
  1. SK
    SK avatar
    4 posts
    Member since:
    Aug 2012

    Posted 11 Aug 2012 Link to this post

    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,


  2. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 14 Aug 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. SK
    SK avatar
    4 posts
    Member since:
    Aug 2012

    Posted 05 Sep 2012 Link to this post

    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,
  5. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 06 Sep 2012 Link to this post

    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.
  6. Benjamin
    Benjamin avatar
    6 posts
    Member since:
    Sep 2010

    Posted 07 Jan 2014 Link to this post

    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.
  7. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 10 Jan 2014 Link to this post

    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.
  8. Marc
    Marc avatar
    1 posts
    Member since:
    Jan 2014

    Posted 22 Apr 2014 Link to this post

    Any update on this?
  9. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 25 Apr 2014 Link to this post

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017