Why and how do they do this? Is there a way to stop it? It’s annoying.
Usually, if you click a couple of times rapidly, it will leave the site. But not always.
I’m still curious as to “why”.
On some sites it’s obvious that they want to force you to take a path (link) that they have a commercial interest in.
But other sites seem to have no need for this. Is there something about the web design that may create this state as a default?
If you right click the back button, you can select and go back to the page before it started doing that.
You can add a page inbetween two pages that has a redirect programmed in to it. It would be page B in a sequence of pages A-B-C. Since the only thing it does is redirect and not show you anything, the user doesn’t realize it’s a page. So when you are on A and click a link that takes you to B, it runs a script that redirects you to C. To the user, it looks like you went A to C. But when you are on C and hit the “Back” button you are taken back to B…whose job it is to redirect you to C and that’s exactly what it does.
Why? The site may need to change the destination of a link on A without changing the actual link, so they change B instead, adding the redirect to C.
Or, they might use B to collect some kind of information and then make a decision on which page is actually C. Should C be Coaches.html or Players.html?
A might be a form and B might collect the value of a form and C might say “Thanks for filling out the form.” You have no reason to be at B unless you’ve come from A, and no reason to go back to B to re-submit your form info, so B makes sense as a redirect.
There’s probably a lot of reasons I’m forgetting.
The easiest way to “combat” this is to go up to your browser’s “Back” button and press it with the left mouse button, and a menu will come up allowing you to choose which page to go back to. Don’t go back to the previous page, go back TWO pages.
It’s sometimes badly written javascript that does this. There’s an “onunload” event that occurs in a browser that many sites use to do certain functions, like save cookies. Unfortunately some poorly written javascript code, sometimes using third party javascript libraries or including a third party site inside an iframe, internally reloads the current url causing the same page to load over and over again.
Sites that use a Javascript-based redirect instead of a server-based redirect.
And yes it is a “bad practice” which has been around way too long due to terrible web developers and/or web servers with strange opaque configuration methods (I’m looking at you, Apache!) and/or web developers who need to do a redirect but don’t have access to the web server configuration.
Some of these invisible pages are labeled ‘doubleclick’ in the dropdown back menu. So I’m guessing they’re there deliberately. And there can be dozens of them between pages.
I’ve recently found a couple of websites with dozens and dozens of these things. Those aren’t labeled doubleclick. I didn’t count, but I wouldn’t be surprised if there were a hundred of them on both of those sites. That’s far more than the dropdown can display, so you’re stuck pulling down the menu and choosing the oldest version ten or more times.
It truly sucks.
doubleclick is an advertising server, so they are tracking you, writing to cookies, and figuring out which ads to serve.
It just occurred to me that some sites might be using client-side redirects to set a first-party cookie on the browser that they can then go back and read later. It’s still bad engineering, but it works-around the default Safari config which disallowed third-party cookies.