I often run into a situation where hitting the back button will “skip a page”.
For example, I’m on the welcome page localhost:8080/
and hit “new order”, and because I have a two-step process I’m first sent to PrepNewView localhost:8080/PrepNewOrder
, and submitting the form there calls CreatePrepOrderAction which does a redirectTo (NewOrderAction someId)
. Now at the NewView localhost:8080/NewOrder?someId=deadbeef
if I hit the browser back button, I get sent all the way back to the welcome page localhost:8080/
instead of the intermediate PrepNewView. And then if I hit forward, it changes the URL to localhost:8080/NewOrder?someId=deadbeef
but the page contents don’t get changed.
I keep running into this, so I guess I’m doing something very wrong here Is there any documentation on how redirects and such interact with turbolinks and browser window history?