[Javascript] dreaded back button click after a form POST?

Sriram Venkatasubramanian Sriram.Venkatasubramanian at adeasolutions.com
Mon May 2 08:55:49 CDT 2005


I think , this seems to be a good idea. 
Will this suffice , if the browser refresh is clicked ? I could see many
bank site they disallow the refresh, back button ,if we click , they
show 
Page expired message. I wonder how they do it . Any ideas ?

-----Original Message-----
From: javascript-bounces at LaTech.edu
[mailto:javascript-bounces at LaTech.edu] On Behalf Of Mike Dougherty
Sent: Monday, May 02, 2005 7:06 PM
To: [JavaScript List]
Subject: Re: [Javascript] dreaded back button click after a form POST?

We put a hidden form field as a timestamp the form is generated, and
keep that value on the server 
(i know using session is bad, etc. caveats understood)

When the form is submitted the first time, the keys match - then the
server-side token is deleted. 
 The second time the form is submitted (from the browser's cached copy
of the page) the timestamp 
doesn't match, and i return a message telling the user that we've
prevented submission from an 
expired page.  You could probably regenerate the form using the
submitted values, prompt them to 
confirm that they really want to submit an old page (possibly generating
another order)


On Mon, 2 May 2005 21:29:42 +1000
  Chris Harrison <chrisharrison.com.au at gmail.com> wrote:
>Howdy,
>
>I'm wondering how people have solved the dreaded back button click
>after a form POST?  You know when you click the back bottun after a
>form submit and the browser prompts something to the effect of "this
>will cause a page submission".
>
>Cheers,
>Chris.
>http://chrisharrison.com.au
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
>__________________________________________________________
>This message was scanned by ATX
>7:29:59 AM ET - 5/2/2005

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list