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

Script Compression

3 Answers 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 11 Nov 2009, 02:38 AM
Hello,

Is script compression supposed to work in debug mode?  If it is, currently it is not for me....  But I do have the http handler setup so combining is working.  Is there another handler or module I need?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Kazi Manzur Rashid
Telerik team
answered on 11 Nov 2009, 12:38 PM
Hi Brian Mains,

Could please sepcify the other settings. By Default Compression is set to true, just make sure no other place has the Compress(false).


All the best,
Kazi Manzur Rashid
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Brian Mains
Top achievements
Rank 1
answered on 11 Nov 2009, 02:09 PM
Hey,

Nothing complicated... simply added the reference to the custom http handler, and did:

Html.Telerik().ScriptRegistrar().Scripts((s) =>
{
    s.AddGroup("Test", (g) =>
    {
       g.Add("scripts1.js").Add("scripts2.js").Combined(true).Compress(true);
    });
}).Render();

It's combined, but not compressed.
0
Atanas Korchev
Telerik team
answered on 11 Nov 2009, 03:13 PM
Hi Brian Mains,

Script compression should not be affected by debug mode - only caching is. I tried your setup in a simple MVC application but compression worked as expected. I tested it with FireFox and Firebug using Visual Studio's built-in web server. I am also attaching the test application for your reference.

What could be different in your case?

All the best,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Kazi Manzur Rashid
Telerik team
Brian Mains
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or