clientcache

web.config cache settings not working

允我心安 提交于 2019-12-08 11:42:36
问题 I want to enable cache for static contents of my website. I found this method using IIS cache control option which I guess it works serverside: <caching> <profiles> <add extension=".js" policy="CacheUntilChange" kernelCachePolicy="DontCache" /> <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="DontCache" /> </profiles> </caching> Also I found this solution for client side cache of static contents: <staticContent> <clientCache cacheControlMaxAge="7.00:00:00" cacheControlMode=

IIS 8.5 MVC5 Client Cache is ignored

霸气de小男生 提交于 2019-12-06 07:49:51
问题 TL;DR - I want the server (IIS 8.5) to return 304 not modified for the CSS and JS bundles. I've been unable to get IIS 8.5 to honor the clientCache settings in web.config. No matter what I do, I can't seem to get it to cache the static content. This is a MVC5 app in VS2013. I've got all the static files in a folder "Assets". The request looks like: http://someserver/AppName/Assets/mainjs?v=FNj_9ZPAbYVAQsyDo2F8XUnWv5NQpY4iX2RGu4NpJ5g1 Attempt #1, place a new web.config in the Assets folder