Export option "disable caching" does not work

You may have noticed that in some cases if content is set to have caching disabled, it will still be cached by the web server and sometimes even by the client browser.
WHY DOES THIS HAPPEN?
Your findings and solutions to this problem are always appreciated.
Just add your replies to this topic so we can all benefit.
WHY DOES THIS HAPPEN?
- Modern web servers use a variety of page caching server and these will not honor the <meta> tags in the ToolBook export that expressly tells the server NOT to cache the data. Generally, the only way to get the caching server to NOT cache the page is to reconfigure the settings of the caching server itself. And most users may not have access to these configuration files as they are locked by the server administrator.
- If your server is able to recognize and use an .htaccess file and you are using an Apache server, then the following suggestion may work for you.
- Create an .htaccess file in your ToolBook book folder and flag it for inclusion in the export of your book like this:
- Make sure the contents of the .htaccess file are as shown below:
- Code: Select all
# Disallow caching of files in this folder
<FilesMatch "\.(html|htm|js|css|php|xml)">
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</FilesMatch>
NOTE: This technique assumes you have marked your exported content to have page caching disabled. This will ensure that the PowerPac inserts the necessary <meta> tags in the .html files of the exported content that tell the server to disable caching for these pages. See below:
Your findings and solutions to this problem are always appreciated.
Just add your replies to this topic so we can all benefit.