Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Prevent expired POST results (Was: Control the window)


  • From: scott at randomchaos.com (Scott Reynen)
  • Subject: [Javascript] Prevent expired POST results (Was: Control the window)
  • Date: Tue Aug 29 23:25:12 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