Is it possible? And how can I call browser back function using jquery?
You can simply fire the “popState” event in JQuery e.g: $(window). on('popstate', function(event) { alert("pop"); });
function preventBack() { window. history. forward(); } window. onunload = function() { null; }; setTimeout("preventBack()", 0);
There is two popular way to make browsers go back to the previous page by clicking JavaScript event, both methods are described below: Method 1: Using history.go() method: The go() method of the window. history object is used to load a page from the session history.
You don't need JQuery for this.
history.go(-1); // go back
history.go(1); // go forward
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With