Some versions of IE have trouble obeying no cache meta tags. Here's
the code I use to prevent caching with CF 5 -- probably snagged it
from this list.

---------

<!--- 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
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to