How do you definitively detect whether or not the user has pressed the back button in the browser?
How do you enforce the use of an in-page back button inside a sin
if (window.performance && window.performance.navigation.type == window.performance.navigation.TYPE_BACK_FORWARD) { alert('hello world'); }
This is the only one solution that worked for me (it's not a onepage website). It's working with Chrome, Firefox and Safari.