Hi Folks,
I'm writing a multistep form with the the help of Ryan Bates
but I want change a little the form after the confirmation redirect to the notification page that appear to the user to communicate that the form just filled out I want that the user can't back with the 'Browser Back Button' at the confirmation page (the previous page)
to explain better what I want for me:
A = is the confirmation page
B = is the notification page
Thanks to Google I found this page
http://blog.serendeputy.com/posts/how-to-prevent-browsers-from-caching-a-page-in-rails/
And to the application_controller.rb I put
before_filter :set_cache_buster
def set_cache_buster response.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate" response.headers["Pragma"] = "no-cache" response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT" end
so when the user is on B when click on the browser back button on Safari a dialog box appear