This project has moved and is read-only. For the latest updates, please go here.

Website output caching

Topics: Developer Forum, User Forum
Jun 27, 2012 at 4:03 PM


I'm writing some user documentation for a web application. I've had some issues with users maintaining a cached version of the pages and therefore not seeing refreshed versions when I've released an updated version of the topics. After a quick Google search I'd come up with a temporary work around which involved semi-manually adding some tags to the <head> of each of the generated pages post-build (<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">). Whilst this seems to work, I'm wondering if a) there's a better way to do this? b) is there a way that I can automate this so that it gets done by the build process?


Jun 27, 2012 at 8:23 PM

You can modify the Sandcastle XSL transformations to add the extra metadata so that it gets added to every topic.  If it's not something you want for every single project, you'd have to create build component or a plug-in that could be added to the project when needed.  If you want to modify the transformations, the ones to change would be main_conceptual.xsl and utilities_reference.xsl in C:\Program Files (x86)\Sandcastle\Presentation\VS2005\transforms.  They contain the <head> element where the metadata would go.



Jun 28, 2012 at 8:48 AM

Thanks Eric,

I thought I'd looked in there, must have missed it before.