Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've set the max age to 1 minute, but when I look at the response headers, I see max-age=86400 (one day). Is something else overriding this setting? I've also set the kernel cache to 1 minute for most mime types to make sure that's not the source. Is there anywhere else I should look for an override? Another webconfig setting?

Here's the relevant part of the webconfig.

<system.webServer>
      <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />      
      <caching enabled="true">
        <profiles>              
          <add extension=".gif" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
          <add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
          <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
          <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
          <add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
          <add extension=".jpeg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
        </profiles>
      </caching>
    <staticContent>
        <!--Enable gzipping JS by changing the mime type.-->
        <remove fileExtension=".js" />
        <mimeMap fileExtension=".js" mimeType="text/javascript" />
        <!-- d.hh:mm:ss -->
        <clientCache cacheControlMode="UseMaxAge" httpExpires="0.00:01:00" />
share|improve this question
    
Oh, Server Fault... Where questions go to die. –  FlavorScape Jul 9 '13 at 20:26

1 Answer 1

up vote 1 down vote accepted

Should Use

cacheControlMaxAge="0.00:01:00" 

instead of

httpExpires="0.00:01:00"

but the latter does not throw an error, just doesn't work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.