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
In javascript, navigation type 2 means browser's back or forward button clicked and the browser is actually taking content from cache.
2
if(performance.navigation.type == 2) { //Do your code here }