Could you please let me know how to detect any browser back button click using java script or jquery?
I am using the below :
if(window.history && window.history.pushState){
window.history.pushState({page:this.href}, null, 'this.href');
$(window).on('popstate', function() {
event.preventDefault();
$('#releaseLicenseApp').modal();
});
}
but it is not working in chrome and ie and firefox.
beforeunloadhandler.