Minify / Obfuscate release scripts?

7 posts, 0 answers
  1. Richard
    Richard avatar
    38 posts
    Member since:
    Nov 2008

    Posted 07 Nov 2008 Link to this post

    Hi,

    Minimizing the length of variable names would reduce the size of the scripts.  Ditto for removing any redundant white space.

    This would be really useful / helpful - to reduce initial page load times, etc.

    Richard
  2. Richard
    Richard avatar
    38 posts
    Member since:
    Nov 2008

    Posted 10 Nov 2008 Link to this post

    Note:  Yslow doesn't think that Telerik.Web.UI.WebResource.axd is minified at all.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 11 Nov 2008 Link to this post

    Hello Richard,

    All our release scripts are minified using the DOJO compressor (not the current official version though). The latter does not remove newline symbols completely for the sake of readability and ease of debugging the release scripts. In the past we had all newline symbols removed and our customers were reporting "error on line 1" which wasn't helpful for anyone.

    Regards,
    Atanas Korchev,
    the Telerik dev team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Richard
    Richard avatar
    38 posts
    Member since:
    Nov 2008

    Posted 11 Nov 2008 Link to this post

    Ok, thanks.

    What i am wanting is to reduce the "initial load time".  The scripts are about 100kb when compressed - which is still quite a lot - when considering other assets need to be loaded.  I realize that some of this could be the base MS stuff.

    The page i am developing just has a menu on it, and some windows that open.  For the menu, i don't need animation, so it would be cool not to have to load the animation script, etc, to cut down the weight.  Ditto for other bits of code i don't "need".  Or, perhaps conditional loading.  After 1 second of all the assets "required" being loaded, the other scripts with "nice-to-have" things (e.g. animation) are loaded.  The various assets on the page work out if the additional assets are loaded yet - if they are, they use them, if not they don't.


    Richard

  6. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 12 Nov 2008 Link to this post

    Hi Richard,

    Have you tried using RadScriptManager? It will compress the output scripts uzing GZIP and will merge all files in one. Also make sure your web site runs in release mode <compilation debug="false"> in the web.config. Alternatively you can se the ScriptMode property of your scriptmanager control to "Release". This would enable the release (minified) scripts of ASP.NET Ajax which are substantially smaller.

    We have thought of including the animation scripts only when needed. Perhaps we would be able to implement that feature for the next release.

    Kind regards,
    Atanas Korchev,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Richard
    Richard avatar
    38 posts
    Member since:
    Nov 2008

    Posted 12 Nov 2008 Link to this post

    Hi,

    i am using the radscript manager. 

    The msajax script seems to load using the "scriptresourcehandler.axd" still.  Is it possible to get this to be combined with the telerik scripts?


    Richard
  8. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 14 Nov 2008 Link to this post

    Hi Richard,

    If you are using the current official release of RadControls for ASP.NET Ajax that script should be combined with the telerik scripts.

    All the best,
    Atanas Korchev,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017