Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

IIS 8.5 and static files caching problem

$
0
0

Hi

I have some website https://goo.gl/WD15BV

Problem is that cache works fine, but  NOT for all file types

For example i checked site on http://www.giftofspeed.com/cache-checker/

  • http://123wa-content/font/ruble/arial/alsrubl-arial-bold.woff 365 days Type: Cache Control ETag is Specified
  • http://123/wa-content/font/ruble/arial/alsrubl-arial-regular.woff 365 days Type: Cache Control ETag is Specified
  • http://123/wa-data/public/site/themes/dsv2/img/social.png 365 days Type: Cache Control ETag is Specified
  • http://123/wa-data/public/shop/themes/dsv2/img/plugins/bxslider/bx_loader.gif 365 days Type: Cache Control ETag is Specified

That`s ok

But, not for jpg

  1. Cache-Control:must-revalidate
  2. Content-Length:6177
  3. Content-Type:image/jpeg
  4. Date:Mon, 07 Mar 2016 09:03:33 GMT
  5. Last-Modified:Thu, 05 Nov 2015 05:47:53 GMT
  6. Server:Microsoft-IIS/8.5
  7. X-Powered-By:PHP/7.0.4

not for png

  1. Accept-Ranges:bytes</div>
  2. Cache-Control:no-cache,public,max-age=31536000,must-revalidate</div>
  3. Date:Mon, 07 Mar 2016 09:03:33 GMT</div>
  4. ETag:"3aebaf55f8f1d01:0"</div>
  5. Server:Microsoft-IIS/8.5</div>

What? no-cache ?

Web.Config

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><directoryBrowse enabled="false" /><caching enabled="true" enableKernelCache="true"></caching><httpErrors errorMode="Custom" /><httpProtocol allowKeepAlive="true"><customHeaders><add name="Cache-control" value="must-revalidate" /></customHeaders></httpProtocol><security><requestFiltering><fileExtensions>            <add fileExtension=".rar" allowed="false" /><add fileExtension=".sql" allowed="false" /><add fileExtension=".fla" allowed="false" /><add fileExtension=".psd" allowed="false" /><add fileExtension=".ini" allowed="false" /><add fileExtension=".log" allowed="false" /><add fileExtension=".sh" allowed="false" /><add fileExtension=".inc" allowed="false" /><add fileExtension=".swp" allowed="false" /><add fileExtension=".htaccess" allowed="false" /><add fileExtension=".htpasswd" allowed="false" />										</fileExtensions></requestFiltering></security><staticContent><clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /></staticContent></system.webServer><system.web><httpRuntime executionTimeout="120" /><globalization culture="en-US" uiCulture="en-US" /></system.web></configuration>

Why there are such problems?

Windows server 2012r2 with all updates


Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>