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

Minify / Obfuscate release scripts?

6 Answers 264 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 07 Nov 2008, 05:00 PM
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

6 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 10 Nov 2008, 06:41 PM
Note:  Yslow doesn't think that Telerik.Web.UI.WebResource.axd is minified at all.

0
Atanas Korchev
Telerik team
answered on 11 Nov 2008, 08:36 AM
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.
0
Richard
Top achievements
Rank 1
answered on 11 Nov 2008, 05:07 PM
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

0
Atanas Korchev
Telerik team
answered on 12 Nov 2008, 03:57 PM
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.
0
Richard
Top achievements
Rank 1
answered on 12 Nov 2008, 05:16 PM
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
0
Atanas Korchev
Telerik team
answered on 14 Nov 2008, 01:33 PM
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.
Tags
General Discussions
Asked by
Richard
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or