He just mentioned I place the code, inside the <system.webServer> configuration.
After looking at it I was a bit apprehensive in implementing this setting in the web.config file:
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
I have an idea, it could represent 10 days, but wasn't sure, since this is the first time I saw this code.
After an extensive search, which was hard since there isn't much result on the usage and value syntax for this settings. Also, the result always reflect as IIS, which makes me wonder when I see it if that is correct result.
It is confirmed it represents 10 days. Ten days cache on the client's browser cache, which I don't know how the microsoft technology can do it on client side level. But that was the explaination on this website: http://blog.janjonas.net/2011-08-21/microsoft-iis-7-enable-client-side-browser-caching-static-content-web-config
It says that the static contents such as image file, CSS and javascript files will not change based on the instruction given to the browser, on the page header.
The other source explained for this script can be found here: http://www.iis.net/configreference/system.webserver/staticcontent/clientcache
Which is also based on the first link, to a IIS.net resource, which confuses me, since I thought this was a .Net settings.
No comments:
Post a Comment