This is what I use, seems to work pretty well. I put it into an include
file and use it in the header of all the pages I serve up that require
cache control.

I belive this was from someone else on the list from not too long ago:


<!--- Client side cache prevention --->

<!--- Setup our expire times for Netscape and Internet Explorer --->
<cfoutput>
        <!--- Internet Explorer Date Formate: (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 (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">
                <cfhtmlhead text='<meta http-equiv="Expires"
content="0">'> 
<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">
                <cfhtmlhead text='<meta http-equiv="Expires"
content="0">'>
</cfif>

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net
[EMAIL PROTECTED]
(704) 569-9044 ext. 254
 
************************************************************************
*************
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]
************************************************************************
*************


-----Original Message-----
From: Jared Clinton [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 09, 2002 5:24 PM
To: CF-Talk
Subject: RE: Warning: Page has Expired


AFAIK:

To get the page has expired message, you have to have posted information
from a form submission.  

But why would you want to?


Jared Clinton.

-----Original Message-----
From: Stevens, Jason [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 10 December 2002 8:16 AM
To: CF-Talk
Subject: Warning: Page has Expired


I have no doubt that this is a no brainer but I can't seem to find the
answer. I've tried setting the expiration in the meta tag but it doesn't
seem to give me the result I want.

I want a page to expire if it is either refreshed or if someone tries to
hit the back button to see the page. How would I go about that? I would
like to invoke that standard page that we've all seen before with
"Warning: Page has Expired".

Thanks

-Jason

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to