Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What keeps the back button from working on some sites?

So we've all been to some annoying websites that disable the back button in your browser. This can be circumvented by quickly pressing the back button two or three times. My question is: what is exactly happening when the back button is disabled and 2.) why does clicking the button two or three times fix the problem? Dying for an answer, don't let me down, SO! :)

like image 257
dzilla Avatar asked Jun 03 '11 15:06

dzilla


People also ask

Why do some websites disable the back button?

Script preventing you from going back If neither of the previous sections resolved your issue, you have encountered deliberate, poor, or malicious code. Some websites add code to their pages that prevent users from using the back button to leave their pages or site.

Why does my back button not work?

Force Restart the Device It fixes all the glitches which can possibly lead to issues like these. For this, hold down your smartphone's power button for 7-10 seconds. After the phone restarts, the home and the back button on your Android phone should work just fine.

Why does the back arrow not work?

If the back arrow is still not working, try resetting your browser. To revert your browser to default settings, go to Settings and type Reset in the search bar. Click on the Reset button to revert your browser to its initial settings. If that didn't work either, reinstall your browser.


2 Answers

It's redirection - you click a link to page a which redirects to page b. When you click back you go back to page a which instantly redirects you back to page b. If you click twice quickly then there isn't time to redirect.

I don't think your question has anything to do with Twitter. There's another back-button problem with JavaScript apps that don't do page reloads where changes to the page don't register as history events, so pressing back takes you back much further than you expected. But that's a completely unrelated issue.

like image 71
Skilldrick Avatar answered Nov 14 '22 23:11

Skilldrick


I think you'll find a decent answer here (http://www.htmlgoodies.com/tutorials/buttons/article.php/3478911/Disabling-the-Back-Button.htm) under Method Three: Frames Trap.

like image 31
joshmax Avatar answered Nov 14 '22 22:11

joshmax