Copy link to clipboard
Copied
Hi,
first of all I hope to provide a clear explanation of the problem I'm dealing with, if not I apologize.
In my fantasy football website I enable users to change only one player from their roster on a weekly basis.
No problem with that: once the new player has been selected, the change is made and the user gets sent to a page confirming that everything went right.
The new roster is shown updated if the user clicks on the "roster" link on the main menu.
A problem arises if the user pushes the browser's back button instead, since the form which enables roster changes becomes available again (and I'll somehow have to make sure that it doesn't), but most of all, if the user presses back again, the page with the original roster is shown, i.e. displaying the player just dropped instead of the newly acquired one.
I guess something must be added at the beginning of the page showing the roster, but I wonder what sort of check it should perform.
Any suggestions ? Do I have to provide code ?
Thank you
Giovanni
Pages are cached by default. The following three commands will make them not cache.
<CFHEADER NAME="Cache-Control" VALUE="no-cache, no-store, must-revalidate">
<CFHEADER NAME="Pragma" VALUE="no-cache">
<CFHEADER NAME="Expires" VALUE="-1">
We do this so often we made a custom tag with those three commands.
Copy link to clipboard
Copied
Don't cache the pages.
Copy link to clipboard
Copied
Thanks for replying, but I haven't solved the problem yet.
Are pages cached by default ? I'm asking since I didn't do anything to cache them.
I looked the caching subject up on the CF documentation but couldn't come out with a solution: does it have to do with using the cfflush tag maybe ?
Thanks
Giovanni
Copy link to clipboard
Copied
Pages are cached by default. The following three commands will make them not cache.
<CFHEADER NAME="Cache-Control" VALUE="no-cache, no-store, must-revalidate">
<CFHEADER NAME="Pragma" VALUE="no-cache">
<CFHEADER NAME="Expires" VALUE="-1">
We do this so often we made a custom tag with those three commands.
Copy link to clipboard
Copied
It works !
Thank you !
Giovanni
Copy link to clipboard
Copied
Hmmm...
... I remember that there is something about using redirects that will zap the "back" linkages. But I cannot for the life of me remember what it was ...
Copy link to clipboard
Copied
TLC-IT wrote:
Hmmm...
... I remember that there is something about using redirects that will zap the "back" linkages. But I cannot for the life of me remember what it was ...
It's not that redirects zap the back linkages, but that they are part of the back history chain. Thus you hit the back button return to the redirect URL which again redirects you to the page you just tried to leave with the back button, causing an endless loop, unlsss the user manages to skip over the redirect item in the back history.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more