Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi.
I recently switched to umbraco as my cms system. I am really happy with everything, and my pagespeed is awesome.
The only issue i have is with the browser caching.
I have looked at tons of forum and google searches that said conflicting things, so now i ask you.
What would be the best way to leverage browser caching (in regards to pagespeed optimization)
Thanks in advance.
Best regards.
Hey Asger,
You only need to add the following lines to your web.config:
<staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> </staticContent>
I'd also highly recommend you to have a look to https://github.com/h5bp/server-configs-iis/tree/master/doc. You can find really useful settings tweaks there and, very important, the explanation about what they do.
Cheers!
That link looks very usefull, i will read trough it right away. thanks :)
I added the code to my web.config file, but somehow it just crashed.. How can that be? does it have to be in a specific part of the file?
It apears that my mistake is a missing section decleration in the webconfig file. How do i know what the section decleration should be?
Look the official docs: https://www.iis.net/configreference/system.webserver/staticcontent/clientcache
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Leverage browser caching (best practice)
Hi.
I recently switched to umbraco as my cms system. I am really happy with everything, and my pagespeed is awesome.
The only issue i have is with the browser caching.
I have looked at tons of forum and google searches that said conflicting things, so now i ask you.
Thanks in advance.
Best regards.
Hey Asger,
You only need to add the following lines to your web.config:
I'd also highly recommend you to have a look to https://github.com/h5bp/server-configs-iis/tree/master/doc. You can find really useful settings tweaks there and, very important, the explanation about what they do.
Cheers!
Hi.
That link looks very usefull, i will read trough it right away. thanks :)
I added the code to my web.config file, but somehow it just crashed.. How can that be? does it have to be in a specific part of the file?
Best regards.
It apears that my mistake is a missing section decleration in the webconfig file. How do i know what the section decleration should be?
Look the official docs: https://www.iis.net/configreference/system.webserver/staticcontent/clientcache
is working on a reply...