You need to set not only the "Expires" HTTP header, but the
"Cache-control=no-cache" and Pragma=no-cache" also.


Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

----- Original Message -----
From: "Peter Fleck" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 22, 2003 1:05 AM
Subject: Clearing a Form


I have a cgi that creates a form and then receives the output of the
form and sends it to a mysql database. It also displays the form
information as a preview of what is getting sent to the database.

You can return to the original form with data if you need to correct
something via an 'Edit' button. This button also makes sure that
nothing gets stored in the database (by deleting the data that was
just sent and I know there must be a better way to do that part but
it's not my current question).

If the visitor uses the browser 'Back' button to return to the form,
their data will be there but the record won't get deleted from the
database.

How do I erase all the data from the form if the visitor chooses to
use the Back button? I tried the CGI.pm method mentioned in
O'Reilly's CGI Programming:

print $dataIn->header( -type => "text/html", -expires => "now");

but that doesn't do it.

I'm wondering if javascript is the answer?

Thanks.
--
Peter Fleck
Webmaster | University of Minnesota Cancer Center
Dinnaken Office Bldg.
925 Delaware St. SE
Minneapolis, MN  55414
612-625-8668 | [EMAIL PROTECTED] | www.cancer.umn.edu
Campus Mail: MMC 806

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to