Click here to Skip to main content
14,927,434 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi All,

I have the page with hidden fields and sesisons which are required to load the web page.I would like to know the possible ways to disable the browser back button either in javascript or JQuery.Even if user clicks then screen should not navigate and should stay on the same page.
Tried with window.history.forward() and is still going back and getting the error web page cannot be displayed.
And this should work in latest browsers as well

Thanks in Adavance !!
Hari
Posted
Comments
Maciej Los 24-Aug-15 13:41pm
   
Why? I hate such kind of software...

1 solution

   
Comments
Sergey Alexandrovich Kryukov 24-Aug-15 14:59pm
   
5ed.
—SA
Maciej Los 24-Aug-15 15:27pm
   
Thank you, Sergey.
machcha 2-Sep-15 13:14pm
   
Thankyou Maciej !!

But we are looking for the solution which will work for IE9 and above.The solution window.history.forward is not working in IE9 and above browsers.

Thank You !!
Maciej Los 2-Sep-15 13:52pm
   
You're very welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900