Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8832

Custom Cache-Control header for media files

$
0
0
Hi, i'm trying to custom the cache control header for my media files. But as i see, kentico cms added the Cache-Control header in to the response header. I'm try to remove it by the following code snippet in Application_BeginRequest function in global.ascx.cs fileif (context.Request.Path.ToLower().Contains(@/getmedia/@)) { context.Response.Headers.Remove(@Cache-Control@); context.Response.Headers.Add(@Cache-Control@, @max-age=604800@); } But i cannot see my value in the Cache-Control header. The value alwaysset as the default value from the CMS.

Viewing all articles
Browse latest Browse all 8832

Trending Articles