7

I've added below one in web.config

<staticContent>
   <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>

But I'm not seeing expires on response headers. Should I do any other changes?

enter image description here

Community
  • 1
  • 1
user3194721
  • 765
  • 4
  • 14
  • 47

1 Answers1

1

I would try two things to debug. First I would change cacheControlCustom from private to public

<location path="Content">
  <system.webServer>
    <staticContent>
      <clientCache 
             cacheControlCustom="public" 
             cacheControlMode="UseMaxAge" 
             cacheControlMaxAge="10.00:00:00" />
    </staticContent>
  </system.webServer>
</location>

If that does not work check the location of your path covered for caching. Your example is not showing that part.

Lastly, try to unlock StaticContent section of machine config via:

appcmd unlock config /section:staticContent

Here is a link with some additional useful information Client Cache.

CrnaStena
  • 3,017
  • 5
  • 30
  • 48