[Javascript] Prevent expired POST results (Was: Control the window)
Scott Reynen
scott at randomchaos.com
Tue Aug 29 23:24:25 CDT 2006
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
More information about the Javascript
mailing list