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

ScriptRegistrar, compress

1 Answer 344 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Krzysztof Wiśniewski
Top achievements
Rank 1
Krzysztof Wiśniewski asked on 02 Jun 2012, 07:11 AM
Hosting service, I use it, can works only in medium trust mode and I can't to set some parameters like compressing. Up to day I use in Telerik MVC applications code looks like this:
    @(Html.Telerik().ScriptRegistrar()
        .Globalization(true)
        .DefaultGroup(group => group
            .Add("~/Scripts/modernizr-1.7.min.js")
            .Add("~/Scripts/jquery-1.7.1.min.js")
            .Add("~/Scripts/jquery.min.js")
            .Combined(true)
            .Compress(true)
            .CacheDurationInDays(14)
        )

and
    @(Html.Telerik()
        .StyleSheetRegistrar()
        .DefaultGroup(group => group
            .Add("telerik.common.css")
            .Add("telerik.windows7.css")
            .Add("Site.css")
            .Combined(true)
            .Compress(true)
            .CacheDurationInDays(14)
        )
    )
Everythink works fine and typical page speed measured by google pagespeed tools was not less than 85 points with/without CDN.
Now, I would like to use similar code in Kendo UI MVC based programs. How to do it? Testing code used Telerik Kendo UI MVC without compressing gives me not satisfied result equal 54 points :(

Krzysztof

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 04 Jun 2012, 07:17 AM
Hi, 

You have the following options:
  1. Enable compression in your web server. This is the recommended approach. Here is a blog post showing how to do this: http://blogs.msdn.com/b/vivekkum/archive/2009/02/18/http-compression-in-iis-6-and-iis-7-using-service-account.aspx 
  2. Use the bundling support of ASP.NET 4.5: http://weblogs.asp.net/scottgu/archive/2011/11/27/new-bundling-and-minification-support-asp-net-4-5-series.aspx 
  3. Continue to use the ScriptRegistrar and StyleSheetRegistrar

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Krzysztof Wiśniewski
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or