What is it about certain websites that prevents you from using the Back button?
Asked by
Jeruba (
56106)
October 10th, 2011
It’s like they mean to hold you captive. Of course you can escape by other means, but you can’t just back out. Extremely annoying. What do they do to prevent this, and is there a way to override it?
Observing members:
0
Composing members:
0
20 Answers
I expect that they want to hold you there long enough to be malicious.
Many times overriding it is as easy as double clicking on the back button.
It works most of the time for me on my iPhone. I read that tip somewhere and it has improved my life immeasurably.
I mean how do they do it? What do they do to prevent you from using the Back button?
Sorry. I thought by override it you meant finding a way to “back out of it”.
I know it has to do with how the site is coded. And even if you know how to do it, it’s not as if you can just go and re-code somebody else’s site.
I guess a hacker could but the site staff would just change it back to what it originally was.
And hackers can potentially get prosecuted for that. Much easier to just double click the back button, right?
I’m just guessing, but perhaps this happens when an inescapable page has a hidden redirect to the same page.
That way, when you click on the back arrow, it only takes you back to the page with the hidden redirect….
Firefox has an advanced options section where one can get a warning when a website tries to reload or redirect a page, so perhaps that might provide some resolution.
If the redirect / reload is implemented in JavaScript then NoScript extension for Firefox will stop it. IMO all Firefox users should use NoScript, but your mileage may vary. Also, if you are Javascript savvy you could write a Greasemonkey script to stop that behavior or find one on userscripts.org that does so.
If you aren’t using Firefox then of course neither of those will work for you. Perhaps there is some other way to disable JavaScript in the browser you use.
Response moderated (Unhelpful)
They also fill up your tabs history by reloading the page or falsifying the relaid quickly, and then redirect back.
Response moderated (Spam)
Response moderated (Off-Topic)
The few times that has happened to me I’ve usually been able to overcome it with a quick double-tap or triple-tap on the Backspace button. (Sometimes I go back a page too far that way, too.) It is a pain.
How they do it is with Javascript that either erases your recent browser history, or loads your recent browser history with the URL of the same page each time the page is loaded. Javascript can also redefine the functions of your mouse buttons and some browser buttons (like sites that prevent you from right clicking on an image to save it).
Very rude behavior!
Unfortunately, disabling Javascript in your browser breaks a lot of useful things on some sites.
If only browsers would selectively disable some Javascript behavior (like redefining your buttons and writing to your history) while letting the useful non-malicious behavior run.
@HungryGuy It’s apparently possible (but not easy) to disable certain JavaScript functions in Firefox by using some policy preferences in ‘user.js’ in your profile. I’m not sure how it works and don’t intend to try it (NoScript’s domain-based blocking is good enough for me). I haven’t found any other method of locally disabling specific functions, but I agree that it’s a feature we should have available to us.
@HungryGuy, that’s exactly what I was wondering.
I did also ask how to override it, and I’ll try the double-click as a first resort. Thanks, @Buttonstc.
@koanhead, does NoScript limit your ability to do anything you might want to do or prevent access to sites you might really want to visit?
@Jeruba – All browsers let you disable Javascript completely (but again, that breaks a lot of sites and defeats much of the purpose of the Internet), but none that I know of let you selectively disable only the malicious uses while allowing the useful uses (unless you can change your policy as @koanhead suggested). Otherwise, your only option is to write your own browser that ignores certain Javascript commands (like redefining your mouse buttons, altering to your preferences and history, and launching sites that you didn’t explicitly click on).
I’m sure they don’t, but it almost seems like browser publishers actually condone malicious Javascript behavior per the way most browsers handle Javascript functions.
@Brian1946, oh! Is that what “Warn me when web sites try to reload or redirect the page” means? I just clicked that in my Firefox options. Now let’s see you try it, buster.
@Jeruba Yes, it does- but only temporarily. By default NoScript blocks all “client-side” scripts on any site you visit. In the lower-right corner of your browser window you’ll see a little “S” icon with a red circle around and line through it. That expands to a menu allowing you to allow content from the various domains serving it to the site. You can choose to “temporarily allow foo.com”, “permanently allow bar.com”, or “allow scripts globally”. That last option is considered dangerous, and NoScript will warn you before letting you do it.
Response moderated (Off-Topic)
Response moderated (Off-Topic)
Response moderated (Off-Topic)
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.