Based on the discussion in this post:
We got on to this thread:
Maybe you are looking for
window.history.length? UPD: just double checked, it doesn't subtract the number when you use back button :/
Maybe there's a way to do some programming magic and get that to work?
Between that and other persistence like
localStorage etc, there is probably a technically possible way to make it happen. We only have to worry about on-site situations because this is for the standalone app.
This is a pretty generalizeable situation so if anyone wanted to build a library for this I'm all for it! 😄
I believe all the information about determining
cangoback would exist in the information about past actions taken on the site and persisted in whichever way was called for.
If someone wants to take a stab at this, it would be really useful!