Saturday, July 8, 2017

How to set up static content max-age and settings

For caching implementation it's must require to set up the right strategy for the static content, here are the option to configure for static files.

Cache-Control
max-age=1661118
ETag
"da495ffba9432d21:0"

We can set “Cache-Control: max-age” either by configuring at IIS level, programmatically or Sitecore configuration as well, please refer screenshots below:


 Option 1 - IIS Configuration.


 Option 1 - Programmatically.



 Option 3 - Configure caching for static resources in Sitecore.

Location
  1. system.webServer/caching
  2. system.webServer/staticContent/clientCache
  3. location/system.webServer/staticContent/clientCache

References:- 
  1. https://sitecore.stackexchange.com/questions/5573/how-to-configure-caching-for-static-resources-in-sitecore
  2. https://sitecore.stackexchange.com/questions/2207/what-does-the-disablebrowsercaching-setting-actually-disable









No comments:

Post a Comment