Disable Back Button in Browser using jquery

In my previous posts I have explained various topics like Jqueryasp.net, visual studio,C#.Net,Console application

Now in this post, I will explain How to disable Back Button in Browser using jquery
with appropriate example.
Now Open Visual studio and write below lines of Jquery in it to disable back button.

$(document).ready(function() {
        window.history.pushState(null, "", window.location.href);        
        window.onpopstate = function() {
            window.history.pushState(null, "", window.location.href);
        };
    });

Summary

dotnetbyexampleI hope you get an idea about How To Disable Back Button in Browser using jquery.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you liked this post, don’t forget to share this.