Gossamer Forum
Home : General : Perl Programming :

weiring refresh

Quote Reply
weiring refresh
I have written a guestbook and it seems everything ok for post and reply..

But when I press refresh the script just repeat printing my previous post(if it is reply, it post same reply) with just posting time different..

seemingly the proxy make things mess...

Just to ask anyone has such experience...
Quote Reply
Re: [golden_water] weiring refresh In reply to
Thats normal, when you refresh it will re-post the form data.
Quote Reply
Re: [golden_water] weiring refresh In reply to
Yep. The way IE catches form data absolutely sucks.

Basically, IE sucks and you should instruct everyone that visits your website to download Mozilla. Simple. Microsoft claim to have fixed this in version 6 but I still see problems.

A few things for you to try...

Try outputting a Cache-Control: no-cache header with your form.

Append a dummy paramater to the end of the URL, maybe generated randomly or by the date so that this would trick IE into thinking that it's fetching an unique URL everytime.

And the funniest comment in the world comes from this Microsoft support article:


"When you use the <HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> metatag in the header section at the beginning of an HTML Web page, the Web page may still be cached in the Temporary Internet Files folder."

That's a priceless quote. It basically says, even though you specify a no-cache rule, IE doesn't care and caches it anyway. Oh well..

The following document might also help you:


But my suggestion: put a BIG 'download Mozilla' link on your homesite and instruct everyone to do exactly that. :-)


- wil
Quote Reply
Re: [Wil] weiring refresh In reply to
wil, thanks..

I just get knowing what this


means..from you.. And..your are right..I added

both NO-CACHE and expire=-1 as told from the link..

No use at all..

Last edited by:

golden_water: Jun 18, 2002, 4:43 PM
Quote Reply
Re: [golden_water] weiring refresh In reply to
I actually think it's a feature... if a form times out, all I have to do is refresh.

You should create a success page on any form post anyways, and then from that success page link (or auto-redirect) back to the main script with no parameters attached. Just good style to give the user immediate feedback that their form input was processed...
Quote Reply
Re: [oldmoney] weiring refresh In reply to
Is that something like

print "Location:http://path-to/your.pl";

after every post or any others??
Quote Reply
Re: [golden_water] weiring refresh In reply to
Um, no... the logic would look something like:

if ($in{'action'} eq "submit") {
# write the new data
# display the "Thank you for submitting page"
} else {
# display the main board/guestbook/whatever

...and then on the Thank you page, you'd have a link pointing to your script. Then your no-cache should work.

How are you parsing your incoming post data?
Quote Reply
Re: [oldmoney] weiring refresh In reply to
Microsoft recommend putting a second <head> at the bottom of your page with the no-cache tag there instead of at the top. (no-cache doesn't work with IE5)

Last edited by:

Paul: Jun 19, 2002, 7:09 AM