[Javascript] dreaded back button click after a form POST?
Mike Dougherty
mdougherty at pbp.com
Mon May 2 08:36:20 CDT 2005
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
More information about the Javascript
mailing list