I agree with RottenApple that it's probably the site(s), not the browser.
There are multiple ways to code a website to achieve the effect of disabling the back button. I say "effect" because you can't really disable it, but you can achieve the appearance of it being disabled. Why some site think this a good idea is beyond me, but it's relatively common. I'll describe some of the methods used to do this, but it can be difficult to know what technique is being used because the content finally displayed may not contain the source-code used to achieve the trick.
One method is to use JavaScript to open a new window that contains the webpage you want to display, tell the browser to disable the toolbar function (including the back button), and then automatically close the original window. If the site doesn't include the JavaScript on the called HTML page, then you can't see it by looking at the final page source. (This is probably not what you're experiencing because the Back button disappears altogether.)
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
function goNewWin() {
window.open("http://domain.com/the_real_webpage.html","newwindow","toolbar=0,status=1,menubar=0");
self.close()
}
</SCRIPT>
One way to defeat this without closing the window is to right-click anywhere on the page that's finally displayed. Most browsers give you a context menu that includes the option to go back a page. It's possible to disable that context menu option, though, by including this suffix to the HTML <body> tag:
Code: Select all
<body oncontextmenu="return false;">
A method with JavaScript that still shows the Back button but effectively disables it is to use the history.forward function:
Code: Select all
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
</HEAD>
<BODY onload="noBack();"
onpageshow="if (event.persisted) noBack();" onunload="">
[Regular HTML page content]
</BODY>
Every page involved would need to have that added to it. In other words, if you on Page A, then click to move to Page B, to keep a visitor from going back to Page A the code would need to be on both pages.
There's a more intricate JavaScript method that can be used to allow a visitor to go back to previous pages viewed on your domain, but prevent them from going back to an external referer, like a search results page.
Another method doesn't require JavaScript, but relies on frame redirection.
Code: Select all
<FRAMESET ROWS="100%,*">
<FRAME SRC="backcontrol.html">
<FRAME SRC="blankpage.html">
</FRAMESET>
This creates two frames, one that's set to 100% size and one that's zero (but the HTML page has to exist, even if it's empty). The 100% frame loads a page I called "backcontrol.html"; can be named anything. The trick is that the HTML contains no visible text, only the following:
Code: Select all
<META HTTP-EQUIV="refresh" CONTENT=".0; URL=realpage.html">
So when "backcontrol.html" loads, it almost immediately calls "realpage.html," the page with the real content. And what happens when a visitor then clicks the Back button? It goes back to "backcontrol.html"...which calls "realpage.html" again. If you can defeat the go-back problem by very quickly clicking the Back button multiple times, this is probably the method used.
There are some other, more complex methods using servlet filters.