Hi all,
disclaimer: I am guessing that my current design simply doesn't allow me (easily) what I want, but there may be a solution I am unaware of.
In my Racket-powered website I want to disable the back button or keep people from using the back button to resubmit (with different data) a previous form or hit a link that is an embedded continuation to a function that should not be called twice.
One way I can do this is to set some variable in the database when the form is submitted or one of several links clicked on a page and check whether it already is set and disallow new submits (or some such). However, I want to do this in many places and don't want to sprinkle all my code and database with names that I can't track. I tried to achieve this by defining a new variable in the request itself that I set to #false initially and then set! to true when any link is hit -- but this fails if a person comes back, refreshes the page and clicks the link, since this creates a new instance of the variable.
Qualtrics surveys have this feature, but the way they implement it is (I think) by being single-page apps where the 'Next' button loads the new page content via an Ajax call. I don't see how to turn my current website into that without substantial rewrites.
Cheers,
Marc