freejoy — 2012-10-31T12:41:36-04:00 — #1
But if the customer clicks his browsers back button it takes him back to the cart view page or what ever page he was on before going to checkout.
I thought about somehow disabling his browsers back button or show an error if he clicks his back button. Because he'll lose his information for his order.
I've been reading and it seems there might be something else better. Some kind of url token but I'm not sure what exactly that is. Ideally, I would like to make it so when he clicks his back button it takes him back one step in the checkout process. I thought if I could somehow add something in the URL that changes it (token?) then the back button would work like I would like.
Any advice is weclome
ronalds — 2012-10-31T18:28:21-04:00 — #2
To save and later retrieve state of page html5 history api could be used [http://diveintohtml5.info/history.html in addition data about cart contents can be stored in browsers localStorage. Or [URL="https://developer.mozilla.org/en-US/docs/DOM/window.onbeforeunload"]window.onbeforeunload event](http://diveintohtml5.info/history.html) can be used to confirm user pressing back button, like gmail does.
freejoy — 2012-11-01T08:01:44-04:00 — #3
Very interesting reading. Might be a little over my head thou.:scratch:
scallioxtx — 2012-11-01T17:44:53-04:00 — #4
Sounds like a job for History.js