Disclaimer! This guide is to be seen as an example on how this can be done rather than an actual instruction. There might be other ways of doing it and there might be reasons to why this is not the best way for you to do it, or even works in your IT environment. 2c8 takes no responsibility for any issues caused by following this guide and can not provide any additional support if the guide does not lead to expected results.
If you have a publish destination hosted by 2c8, we will help you with this. Please get in touch with support@2c8.com and let us know if you are experiencing issues with the cache. |
When a 2c8 HTML publish is replaced with a new version, the web browser may
cache the old version.
The client-side solution is to empty the browser cache (Ctrl+Shift+Delete). This is not a user-friendly solution, so a better solution is to turn off caching of the 2c8 HTML publish on the server side. Please do note that this will force the browser to download the HTML publish from the server each time the user visits the page. Our experience from customers is that this is an acceptable tradeoff.
To suggest to the browser to stop caching the 2c8 HTML publish, add the HTTP header “Cache-Control” with value “no-store, max-age=0”.
Example in Microsoft IIS
For a specific web site:
In IIS Manager
Directly in web.config file
<?xml version="1.0" encoding=UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-store, max-age=0"/>
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
At server level
In IIS Manager
Directly i web.config file
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<caching enabled="false" enableKernelCache="false"/>
</system.webServer>
</configuration>
Comments
0 comments
Please sign in to leave a comment.