[thelist] Session variables vs. the Back button

jeff jeff at members.evolt.org
Mon Oct 30 15:15:11 CST 2000


: From: David Shadovitz
: When I restore form field values from session
: variables, the use of the browser's Back button
: poses problems.  This is not a "How do I disable
: the Back button" question, but rather, "How do I
: accommodate it?"  I'm using ColdFusion, but the
: same applies to ASP, etc.

easy answer?

don't use a session variable to hold a form value - problem solved

i suspect that's not the answer you're looking for though.

depending on the users you have to support you have a number of options.

anthony's suggestion of setting the expiration immediately is good
scott's suggestion of cookies and client-side javascript is good

however, each one has it's problems.  for example, if i enter my info in a
form, hit submit, and end up at a page telling me that the info i entered
had some problems with it and that i need to go back and fix those errors,
i'm going to be *really* pissed off if i hit my back button and get either a
"this page has expired, please refresh from server" message or the form
auto-resets with client-side javascript, both effectively wiping out all the
information i just entered.

so, i guess that leaves a final suggestion - don't sweat it.  it is an
issue, but the consequences associated with addressing that issue raise
greater issues, imho.

good luck,


mailto:jeff at members.evolt.org

More information about the thelist mailing list