[thelist] firefox maintaining post data after refresh

kerkness phparch at gmail.com
Tue Mar 22 13:04:21 CST 2005

I also use a server side redirect to handle this, however the user can
still hit their back button, to re-submit the post.  I'm not sure
there is a complete solution to prevent double posting unless you use
some sort of a 'ticket' system.

What I do sometimes is generate a unique 'ticket number' and include
this in a hidden field in my form as well as save it to the user
session/cookie.  When a form is submitted I make sure the tickets
match and then delete the ticket from the user session/cookie.  If the
user hits refresh or the back button and re-submits the form, I will
not find a matching ticket in the user session/cookie  and can ignore
the post.


 where every potential submission corrisponds with a ticket number generate

On Tue, 22 Mar 2005 15:47:48 +0100, Richard Harb <rharb at earthling.net> wrote:
> AFAIK this kind of behaviour is inherent to all browsers.
> I usually make a server side redirect if I had any GET/POST modify content.
> In PHP you can use header() for that.
> Richard
> -----Original Message-----
> From: kris burford
> Sent: Monday, March 21, 2005, 6:05:00 PM
> > hi
> > i'm building an online management system where, after critical form
> > submissions, the page does an auto-refresh (with a "thanks for
> > submitting" message).
> > i thought that this would clear the post data so that if a user then
> > pressed refresh, the data would not get re-submitted.
> > however it looks like firefox doesn't.
> > has anyone else encountered this and, if so, is there a way around it?
> > i've done a search for online (including the firefox support forums),
> > but couldn't spot anything relevant...
> > tia
> > kris
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

More information about the thelist mailing list