Prevent Internet Explorer (IE) and other browser caching in ColdFusion

04/14/2010
0

Just a quick note - as i keep forgeting this.

With its standard setting Internet Explorer will fetch the same URL from its cache if called a second time within the same browser session. That is if the URL had no special Headers set.

To prevent IE and other browsers from caching a URL simply add this to your Coldfusion files:

<cfheader name="cache-control" value="no-cache, no-store, must-revalidate"> 
<cfheader name="expires" value="-1"> 
<cfheader name="pragma" value="no-cache"> 

If you've read this far you might as well follow me on Twitter here.


Comments