Try this. I just include this code via CFINCLUDE. It works in IE,
which is stubborn when it comes to obeying no cache commands.

-------

<!--- Client side cache prevention --->
<meta http-equiv="Expires" content="0">

<!--- Setup our expire times for Netscape and Internet Explorer --->
<cfoutput>
        <!--- Internet Explorer Date Format: (eg, Fri, 30 Oct 1998
14:19:41 GMT) --->
        <cfset
MSIEtimestamp='#dateformat(now(),"DDD")#,#dateformat(now(),"DD")#
  #dateformat(now(),"Mmm")# #timeformat(now(),"HH:MM:SS")#'>

        <!--- Netscape Date Formate: Netscape (eg, Wednesday, Apr 26
2000 17:45:25 PM) --->
        <cfset
NETSCAPEtimestamp='#dateformat(now(),"DDDD")#,#dateformat(now(),"MMM")
#
  #dateformat(now(),"dd")# #dateformat(now(),"YYY")#
  #timeformat(now(),"HH:MM:SS tt")#'>
</cfoutput>

<!--- Tell HTTP Header to force expire of page - nocache --->
<cfif HTTP_USER_AGENT contains "MSIE">
        <cfheader name="Expires"
value="<cfoutput>#MSIEtimestamp#</cfoutput>">
        <cfheader name="Pragma" value="no-cache">
        <cfheader name="cache-control" value="no-cache, no-store,
must-revalidate">
<cfelse>
        <cfheader name="Expires"
value="<cfoutput>#NETSCAPEtimestamp#</cfoutput>">
        <cfheader name="Pragma" value="no-cache">
        <cfheader name="cache-control" value="no-cache, no-store,
must-revalidate">
</cfif>

-------------
Regards,
Bob Haroche
O n P o i n t  S o l u t i o n s
www.OnPointSolutions.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to