>
Main
>
Archive
>
2011
>
May
>
SetMaxAge in ASP.Net MVC Not Working
SetMaxAge in ASP.Net MVC Not Working
If you are trying to write an http handler in ASP.Net MVC and Response.SetMaxAge is not being passed in the response header, you need to first call Response.SetSlidingExpiration(true) first. Here is the code I use.
response.Cache.SetSlidingExpiration(true);
response.Cache.SetMaxAge(TimeSpan.FromDays(1));
5/21/2011 10:26:33 AM
Comments