Hi There,
I have a situation where I use a Submit button on Page 1, and then the user is taken to Page 2. Because we only want a user to be able to press this button once, I set a cookie and use…
@SetHTTPHeader(“Expires”;@Now);
@SetHTTPHeader(“Cache-control”;“No-cache”)
…to ensure that when a user presses Back on the page is refreshed by the browser, and the button is gone (thanks to a good old hide formula).
Whilst this works fine in IE, it does not work in Firefox or Opera which do not refresh the page on using ‘Back’. Do I need to amend the code somehow?
Any help appreciated.
Cheers,
M@
Subject: Back Button & Refresh
Hi
I’ve also sometimes found the “no-cache” directive doesnt have the desired effect (but in my case when programming with C++, IE kept using cached pages!)
I got around the problem by stopping the cache from saving the page in the first place using the “no-store” directive, and as a double whammy, use the " must-revalidate" directive to force caches to use the expires or max-age value. these are all document on the W3C site
(also, for HTTP 1.0 browsers, you may have to use Pragma:no-cache instead)
Alternatively, maybe you could force a refresh on page loading using js;
self._doClick(‘$Refresh’,this,null);
Hope this helps
Gail
Subject: RE: Back Button & Refresh
Thanks. Does the trick in Firefox but not Opera. Pesky browsers!
M@