Prevent programmers from adding functionality to the back button in browsers

0

I like the way the back button used to behave: it quickly gave me a cached version of whatever page I happened to be looking at before I navigated to the current place.

These days though, sites make increasing use of custom behaviour when you click the back button. This is especially the case for single page sites, but can also be seen in other cases - I click the back button and it either takes an unreasonably long time to go back to the previous page, or something I didn't want happens (e.g. I don't leave a page when I expect to).

What is the best choice of browser and options for me? Is there some plugin that could help me in either chrome, safari or firefox? I guess basically I want a "don't mess with my back button" option. I'm fully aware that this may break functionality in some sites - I'm willing to live with that, since I never use the back button in cases where I don't actually want to go back to where I was.

Edit: case in point right now is the Gerrit code review tool. Unfortunately I can't post a link to our internal installation. What happens is, I'm code reviewing something in Gerrit, looking at e.g. a javascript file. When I click the back button, the url in the browser changes, a "working..." note appears in a div at the top of the browser page (all other content stays the same) and after a while the actual page that I wanted to navigate to loads.

After reading some comments here, I think it might be that this is due to code running on the page I'm navigating back to, but how could that display a note (which would mean altering the DOM on the page I'm leaving)?

I know I've been annoyed by similar things elsewhere, but I'll have to dig around in my brain to remember what they were. :/

TV's Frank

Posted 2014-02-17T15:02:04.960

Reputation: 119

1I have no idea what you are asking the back button always goes back to the last cached version of the last page I went to use the current version of most of the browsers of it doesn't that would be the websites session management getting in the way – Ramhound – 2014-02-17T15:10:28.837

Most pages nowadays have dynamically generated content, that has to be generated once more when you go back. That's probably the feel you get. The back button has not changed, the internet has. If you have some specific example that disproves what me and Ramhound say, please edit your question – Bruno9779 – 2014-02-17T15:27:58.320

"This is especially the case for single page sites" - The problem here is that the "programmer" is perhaps not implementing the "single page site" correctly. The "programmer" cannot change the back-button behaviour directly, however, they can manipulate what "pages" go into the browser history. The problem, however, is that the "programmer" is not manipulating the browser history (more work) so the back button may look as if it is broken. – MrWhite – 2014-02-17T15:52:06.037

Are you (or the programmer) using infinite scrolling by any chance? – Dave – 2014-02-17T16:01:44.530

I've come across this, where using the back button just causes the current page to reload. In these cases I just double-click the button and that gets me back 50% of the time. – Tog – 2014-02-17T16:02:59.673

Edited the original question with an example from Gerrit. I hope I can think of some better real life example. – TV's Frank – 2014-02-17T16:07:47.743

Click and hold the back button, for most browsers this will give you a list of past pages. Pick the one you want. – Zoredache – 2014-02-17T19:15:01.600

Answers

0

I think you might be getting hit with a redirect or refresh call in some javascript that generates the page you're looking at,

For example, I know one site I visit where the back button "does nothing". What its actually doing is when I first visit the site the page does some processing (usually login or other checks) then refreshes the page via a call to itself that displays the full site with the updated details from the first view of this page. So when I click back, I get the first page which.. runs and redirects me to the page I was just looking at.

I find a double-click on the back button skips both pages and gets me back to where I wanted to be. Its not that the back button is broken, just that the site really doesn't want me to leave :)

gbjbaanb

Posted 2014-02-17T15:02:04.960

Reputation: 1 292

That's probably a good theory - I'll keep it in mind. Doesn't work with Gerrit though, as double clicking sends me two pages back... – TV's Frank – 2014-02-18T08:11:44.407