Clear the user's browser cache?
I'm converting a mainframe "green screen" order-entry program into a browser-based one, but have a basic design question. After the user submits their order, how can I prevent them from accessing any of the previous pages that went into making the order? The only way I can think of to do this is to clear their browser's cache after the order is submitted. Is this do-able, or is there a better way to accomplish the same end? Thanks.
Suzanne posted this at 04:13 — 13th December 2003.
She has: 5,507 posts
Joined: Feb 2000
You cannot control the user's settings -- other than preventing things from being cached in the first place and even that isn't all that reliable.
It would be better to use sessions to control the user experience and procedure, and set session variables for anything that can be done only once, such as confirming an order. Once that variable is set, you can test for it -- or rather, you can test for it regardless, and once it's set, you can point the user to another location or an error screen.
kris posted this at 20:51 — 13th December 2003.
He has: 6 posts
Joined: Dec 2003
Thanks for your help. I'm glad that YOU were one of the (...er... at this point the only) responders.
Are sessions something that can only be done in PHP? Do they require some type of scripting? (...which is OK, BTW).
Suzanne posted this at 01:24 — 14th December 2003.
She has: 5,507 posts
Joined: Feb 2000
I *believe* that sessions or their equivalent are a method available in all or most scripting languages. Another option is to set cookies, however that can result in some issues with user preferences. So, yes, it will require some scripting.
If you know what languages are available to you for scripting, you can post in the Scripting forum for further advice and help setting it up.
(and, um, thanks for the compliment! the folks in the Scripting forum will take good care of you as well)
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.