How to remove default cache control header for static resource

Chu Nguyen asked on April 2, 2019 16:53

I currently using k12 with portal engine mode. I using web.config to set cache=control header but i have a problem when try to remove 'cache-control: no-cache' header but it doesn't effect Here is my web.config

<system.webServer>
    <httpProtocol>
        <customHeaders>
            <remove name="Cache-Control"/>
            <add name="Cache-Control" value="max-age=2592000" />
        </customHeaders>
    </httpProtocol>
</system.webServer>

Is there way to solve this? by using code behind/cms setting?

Recent Answers


vasu yerramsetti answered on April 2, 2019 18:29

Add below Key into web.config under <system.webServer> and check it.

<modules runAllManagedModulesForAllRequests="true">

0 votesVote for this answer Mark as a Correct answer

Chu Nguyen answered on April 3, 2019 02:41

Unlucky, it's already exist in my config @vasu yerramsetti

0 votesVote for this answer Mark as a Correct answer

Chu Nguyen answered on April 3, 2019 04:04

I found my problem. Our team member added other config like

<caching>
    <profiles>
        <remove extension=".aspx" />
        <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
    </profiles>
</caching>
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.