Disable browsers' back button, completely

how to disable browser extensions
how to disable browser in android
how to disable browser blocker
how to enable/disable browser add-ons in internet explorer
chrome extensions
how to disable browser in vivo
how to disable browser in oppo
how to disable browser in realme

Need to prevent users going to the previous page, completely.

When I use the following code it works but it's not what I need exactly. When pressing the back button it says "Document Expired":

Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1));
Response.Cache.SetValidUntilExpires(false);
Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();

Another idea - to open a new window without toolbar:

<script>
    function PopupWithoutToolbar(link) {
        var w = window.open(link.href,
            link.target || "_blank",
            'menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,dependent,width=800,height=620,left=0,top=0');
        return w ? false : true;
    }
</script>

<a href="http://www.google.com" onclick="return PopupWithoutToolbar(this)">yahoo</a>

But, still... If the user presses the backspace button on a keyboard he can go back. It seems that this approach is only for hiding and not disabling buttons.

Is there any way to simply ignore the back button?

Based on your post it sounds like your only issue is disabling the backspace button from allowing the user to go back.

Here's what I do for that using jquery. Still allows backspace to work inside enabled text editing inputs, where it should.

    // Prevent the backspace key from navigating back.
    $(document).unbind('keydown').bind('keydown', function (event) {
        var doPrevent = false;
        if (event.keyCode === 8) {
            var d = event.srcElement || event.target;
            if ((d.tagName.toUpperCase() === 'INPUT' && (d.type.toUpperCase() === 'TEXT' ||
                                                         d.type.toUpperCase() === 'PASSWORD' ||
                                                         d.type.toUpperCase() === 'FILE')) ||
                                                         d.tagName.toUpperCase() === 'TEXTAREA') {
                doPrevent = d.readOnly || d.disabled;
            }
            else {
                doPrevent = true;
            }
        }

        if (doPrevent) {
            event.preventDefault();
        }
    });

Disable all web browsers, Disable all web browsers. By ian · 12 years ago. As an employer I have had enough of continually repremanding employees for going all over the place on  Select the Apps & Features tab, then select Programs and Features. In the Programs and Features window, select Turn Windows features on or off. In the Windows Features window, clear the Internet Explorer 11 check box. In the warning dialog box, confirm that you want to disable Internet Explorer.

I am not entirely sure if this will work, but you can try handling the event with javascript.

Like if you want to entirely disable the backspace button from allowing users to go back you can do like

$(window).on("keypress", function (e){
    if(e.keycode == "backspace") 
         e.preventDefault();
})

I could figure out the keycode for backspace for you , but that isn't too hard to figure out. Also this uses jquery, but you can use just raw javascript. just wasn't sure what it would be offhand.

How to disable or remove browser extensions, Learn how to disable Java in web browser. Windows 8, Windows XP, Mac OS X; Browser(s) Chrome, Firefox, Internet Explorer, Safari; Java version(s): 7.0, 8.0​  by robo_dev · 12 years ago In reply to Disable all web browsers just split the network so that some PCs can, and some cannot. Internet Explorer is 'joined at the hip' with Windows, and like a

I'm using a slightly different solution:

history.pushState(null, null, location.href);
window.onpopstate = function () {
    history.go(1);
}

How do I disable Java in my web browser?, In this article, we will tell you how to disable the autofill options in some of the most popular web browsers to prevent this Open your Internet Explorer Browser. And click on Gear icon which is available in top right side of browser, click on it and select the “Safety” and then In-Private Browsing. A new window will appear, on Address bar a blue mark will appear that shows the private mode. Whatever you search or browse, it will not go into your history.

Simplest thing ever:

window.onhashchange = function (event) {
 //blah blah blah
 event.preventDefault();
 return false;
}

You can handle the location domain etc from that (window.location) then cancel the event if you want in this case.

How to Detect Browser Back Button event - Cross Browser

How to Disable and Clear AutoFill Info in your Browser – iClassPro , Learn how to stop your browser from asking to save your passwords, so it doesn't interfere with 1Password. To disable Internet Explorer, click the Start menu and type “control panel” in the search box. Then, click Control Panel in the results. (If you’re using Windows 7, you can just click the Start menu button and then click the “Control Panel” button.) On the Control Panel screen, click the “Programs” category.

To disable the back button in the browser you can use use the following code in your JavaScript on the page on which you want to disable the back button.

<script>
history.pushState(null, null, location.href);
    window.onpopstate = function () {
        history.go(1);
    };
</script>

Turn off the built-in password manager in your browser, How to completely disable browser notifications. Tired of constantly clicking “No” to reject endless notification sign-up offers? Most browsers  Hi, I also would like to disable EDGE browser as I prefer CHROME However, I have noticed a lot of lag since upgrading to 10 and I have noticed when using Ccleaner, EDGE is running and won't close, the files instead are "skipped" so obviously MS have EDGE written in as still to run even when a different browser is selected..!!

How to disable Web browser push notifications, How to disable browser add-ons and extensions in IE, Firefox, Chrome, and Safari. Each Web browser has a different way of disabling the pop-up blocker. Here are instructions for some of the most popular browsers: Internet Explorer (works with IE8) Click the "Tools" button, then select the "Pop-up Blocker" option.

Disabling Browser Add-Ons, Instructions to disable pop-up blockers for the most popular web browsers are provided below. Regardless of the web browser you are using,  To disable the tool bands and Browser Helper Objects, follow these steps: Close all instances of Internet Explorer, click Start, point to Settings, and then click Control Panel. Double-click Internet Options. Click the Advanced tab. Under Browsing, click to clear the Enable third-party browser extensions (requires restart) check box.

Disable Web Browser Pop-up Blockers, windows Disable java in all web browsers. Go to the Windows Start Button and select Control Panel. Click Java in the Control Panel list to open the Java Control​ 

Comments
  • stackoverflow.com/questions/12381563/…
  • You might want to reconsider doing this. A back button is one of the most basic and well known functions of a browser (even my grandma knows about it). Disabling it or changing it's function results in a terrible user experience since the user will probably think that their browser crashed or their mouse is busted since something will (not) happens that has always worked.