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

[Solved] asset.axd output has no expires header?

1 Answer 44 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.
Simon Bell
Top achievements
Rank 1
Simon Bell asked on 02 Oct 2009, 08:08 AM
Hi,

I've tried using your script manager, and the compression and minification works well. However, the cache duration doesn't appear to be set.

In the View, I'm using:

    <% Html.Telerik().StyleSheetRegistrar()
                     .DefaultGroup(group => group.CacheDurationInDays(7)
                                                    .Add("style.css")
                                  )
                     .Render(); %>

In Global, I've set:

            WebAssetDefaultSettings.CacheDurationInDays = 30;

But Firebug/YSlow consistently reports the output of the asset.axd call to be without expires headers, and shows:

    Cache-Control  max-age=0

Any ideas? Is it an issue in the CTP, or am I doing something wrong?

Thanks,

Simon


1 Answer, 1 is accepted

Sort by
0
Kazi Manzur Rashid
Telerik team
answered on 06 Oct 2009, 11:02 AM
Hi Simon Bell,

The Cache is only applied when you run it in release mode, please set debug=false in the web.config, it should have the proper cache header.

Sincerely yours,
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.
Tags
General Discussions
Asked by
Simon Bell
Top achievements
Rank 1
Answers by
Kazi Manzur Rashid
Telerik team
Share this question
or