|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Force Refresh
I've developed a routine for form submission authorization. A randomStan Winchester 05/07/04 03:35 P Try using a randomly generated number (not necessarily the same oneBen Doom 05/07/04 04:20 P Adding another randomly generated number and passing it as a url variable worked for both browsers!Stan Winchester 05/07/04 05:26 P I've developed a routine for form submission authorization. A random alphanumeric string is generated and stored as a session variable. The string is also used to generate an image showing the string. A user inputs the string as shown in the image and on submission if the user input matches the session variable, then we have a match. The problem is that if a test fails, the image does not refresh for the following browser/OS combinations: Mac 10.2 IE 5.2 Mac 10.2 Safari Seems to work fine in all browsers on my XP box. I have not been able to test on Linux yet. Sample: http://www.aftershockweb.com/test/ I'm using CFCONTENT to display the image through an iframe; I'm also using: <CFHEADER NAME="Expires" VALUE="Sun, 06 Nov 1994 08:49:37 GMT"> <CFHEADER NAME="Pragma" VALUE="no-cache"> <CFHEADER NAME="cache-control" VALUE="no-cache, no-store, must-revalidate"> The only way I am able to get the image to reload is to use the browser refresh button. Does anyone have an idea how to force the page to refresh the image? Thank you, Stan Winchester Try using a randomly generated number (not necessarily the same one you're using for validation) in the image href, like: fred.jpg?bob=123215134 Hopefully, the browser will realize that's a dynamic image and not use the one from the cache. --Ben Doom Stan Winchester wrote: > Mac 10.2 IE 5.2 > > Mac 10.2 Safari > > The only way I am able to get the image to reload is to use the browser > refresh button. Does anyone have an idea how to force the page to refresh > the image? Adding another randomly generated number and passing it as a url variable worked for both browsers! Thanks! ----- Excess quoted text cut - see Original Post for more ----- What works for me is to add at time string down to the nearest second to insure uniqueness -- easier than using a random number... <CFSET mT_NAIL = "INBOX\" & #CLIENT.USER_ID# & "\" & #INBOX.NAME# & "?time=" & #timeformat(now(),"hhmmss")#> <IMG SRC="#mT_NAIL#" WIDTH="135" HEIGHT="100" BORDER="2">
|
February 09, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||