Put the below code on the page in question.

  <CFHEADER NAME="Expires" VALUE="Mon, 06 Jan 1990 00:00:01 GMT">
  <CFHEADER NAME="Pragma" VALUE="no-cache">
  <CFHEADER NAME="cache-control" VALUE="no-cache">

jon
----- Original Message -----
From: "Petro Rondiak (Rev3)" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, April 26, 2001 11:25 PM
Subject: Newbie: Trouble With Browser Loading Old Page


> Hello!
>
> I have a page that cfoutputs text from a database and allows a user to
> update the text content. The user simply fills in a form field and clicks
> update. I use an update template that updates the database with the new
text
> the user typed in.
>
> At the end of the update template I use <CFLOCATION> to go back to the
page
> in question.  Unfortunately, the browser keeps showing a local copy and
not
> the updated version, unless I hit refresh on the browser.
>
> I searched the CF resources for an answer and thought I found it at
> houseoffusion (excerpt at bottom )
> with:
>
> <CFLOCATION URL="index.cfm?norefresh=#Rand()#">
>
> Unfortunately, the browser still loads a local copy even though the URL is
> always different.
>
>
> Any help would be greatly appreciated!
>
> Petro
> [EMAIL PROTECTED]
>
>
> -----from Aiden Whithall's FAQ -----------
> "The key to creating a workaround for this situation is to know that
> browsers identify a page by its URL--if the URL is the same as the one it
> just cached locally, it uses the local copy. Accordingly, you can simply
> append a dynamically created variable name to the URL, thereby producing a
> new URL and forcing the browser to make a subsequent call to the server to
> retrieve the new, and up-to-date, page. Here is an example of the code you
> can use to do this:
>
> <CFLOCATION URL="index.cfm?norefresh=#Rand()#">
>
> Rand() returns a random number in the range of 0 to 1, including
fractions,
> so the URL will be different each time you call it, which forces the
browser
> to request the page again from the server. That, in turn, ensures the most
> current information will be displayed."
> --------------------------------------
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to