[Javascript] Prevent expired POST results (Was: Control the window)
Peter Brunone
peter at brunone.com
Wed Aug 30 11:11:12 CDT 2006
Ooh, I like that. Nice, functional, and fully server-side.
I assume they could just hit the Back button twice to get to the post page... but then again, you could get really clever and use location.replace for your GET... or would that still be considered part of the original POST request?
Peter
From: Scott Reynen scott at randomchaos.com
On Aug 29, 2006, at 9:54 PM, Peter Lauri wrote:
> The only real reason for this is that I do not want them to use the
> back
> button when the system have posted information, they then get the
> "page has
> expired" message.
>
> How can I avoid this then? :)
I solve this problem by redirecting POST to GET. When data is
posted, I generate the resulting HTML, save it to a database, and
immediately redirect to a GET request for the database record I just
created. The POST will not show up in the history, and the HTML
result of the POST request will only expire when I decide to remove
it from the database. Much less annoying than breaking the back button.
Peace,
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060830/68376ca2/attachment.htm>
More information about the Javascript
mailing list