Redirect to prevent back button

tyrant@lemmy.world to Mildly Infuriating@lemmy.world – 907 points –

Click a link and need to go back 10x to get back. Yes, I enjoy the footballs.

166

Yeah, I also hate back-button hijacking. I suspect some websites do it to artificially force more page views for ad revenue. Try a long-press on the back button to view the history for that browser tab and click on the most recent page you think won't redirect.

I usually right click the back button and go 2 entries back. Done.

Microsoft also does this a lot on some of their sites.

Usually with this, it's like 20 entries, so pushes everything else off.

The ones where it's only a couple entries mostly seem to be the ones where there's multiple articles on a single page and it's at least might be attempting to be helpful?

Youtube does it, and it just continues to blast the wrong video you accidentally just auto-started because instead if fucking off, it shows other videos with the bad video getting just reduced.

Aaargh for the state of todays internet

I've had this happen only when I go back too quickly, before the page can completely load in

I hate that this is even a feature in the web standard. A result of some massive corporate corruption for sure.

I recently looked into this after it seemed like Facebook messed with my back button on a private mobile window:

Someone pointed out that it's nice to have, for example, your email provider know that you probably want to go back for a message to your inbox instead of going back to the previous page.

But what if browsers monitored which sites abused the feature and showed a pop-up when you click the back button, just like they offer to show you notifications? They could show you:

This site has been reported to hijack the back button. Would you like to go back to the last domain that you visited?

and offer to remember the setting.

This could easily be fixed by the browsers but they don't. Sure wish these back button tricks would stop. Especially news sites try to keep you from getting back to your search and makes your page refresh over and over. I wonder if that behavior counts as hits to their advertisers.

I just default to opening in a new tab because of shitty UX like this

I don't know about "easily." replaceState() is actually intended to make single-page apps easier to use, by allowing you to use your back button as expected even when you're staying on the same URL the entire time.

Likewise, single-page apps are intended to be faster and more efficient than downloading a new static page that's 99.9% identical to the old one every time you change something.

Fixing this bad experience would eliminate the legitimate uses of replaceState().

Now, what they could do is track your browser history "canonically" and fork it off whenever Javascript alters its state, and then allow you to use a keyboard shortcut (Alt + Back, perhaps?) to go to the "canonical" previous item in history instead of to the "forked" previous item.

I can handle life without the legitimate use case if it means no more clickjacking bs from companies that should know better

I'd prefer not to let the bad actors dictate browser design.

"Let's get rid of images since companies can use images to spoof browserchrome elements."

"Let's get rid of text since scammers can pretend to be sending messages from the computer's operating system."

"Let's get rid of email since phishing exists."

Nah. We can do some stuff (like the aforementioned forked history) to ameliorate the problem, and if it's well-known enough, companies won't find it necessary anymore. Heck, browsers like Firefox would probably even let you select Canonical Back as the default Back Button behavior, and then you can have the web the way you want it (like people who disable Javascript).

like people who disable Javascript).

i do that, and i found that a TON of microsoft & bank/work websites just refuse to do anything without it. i love the modern internet /s

I'm frustrated that removing bad functionality is being treated as a slippery slope with obviously bad and impossible jokes as the examples chosen.

I see a bad feature being abused, and I don't see the removal of that bad feature as a dangerous path to getting rid of email. I don't ascribe the same weight that you seem to towards precedent in this matter.

I've been working in full stack for long enough to know that history manipulation is as much a part of the modern web as images and email. I'm not trying to be flippant, that's just the state of the modern web. Single-page apps are here, and that's a good thing. They're being used badly, and that's endemic to all features. So no, history manipulation is not "bad functionality," though I admit it's not fully baked in its current implementation.

I accept that it's how things are, I just personally feel as though the only way this feature could ever work as it does now is with the implementation it has now, and that the convenience of single page webapps that use history manipulation is not worth the insane annoyance of helping my grandma get out of websites that tell her that she has been hacked by the FBI.

Yeah, I get it, but like...the same could be said for emails in a world where phishing exists.

I don't think that email and browser history are similar enough to make a meaningful comparison, honestly.

Maybe someone could say that, but I am not.

I see a specific instance of a specific bad feature being specifically abused. I don't care to entertain whatabouts.

It's not a whatabout, but since you have your mind made up, by all means don't let me get in your way with facts.

I don't think I'm disputing your facts, I was responding to the scenario you presented which was, essentially, "what about email". I would say it's fair that my opinion on a canonical browser history is solid and unlikely to change, though.

Pop a window open with a your app in it (with the user’s permission) without a back button if you want that.

A web page should be a document, not an experience.

That would absolutely make everything worse, no question; the web should be more integrated, not less. We shouldn't incentivize even more companies to silo off their content into apps.

I think the word 'app' was being used in place of 'webapp' there, which is the general target audience for this feature.

Yes, I think you're correct, but using browsers to coerce the web back into static documents will result in companies creating their own apps so that they can continue to deliver experiences. And the past 10+ years has shown that users will absolutely follow them.

Sorry, this comment was mainly just providing the previous user with a correction because they seemed to think that the other person that they were replying to was talking about forcing people to use phone apps, which I assume we all agree is bad and would likely work if there were a concentrated push for it.

Concerning your points after "using the browser": I want websites to use replaceState and manage their own intra-page navigation with a cookie. They can still intercept the back button as they do now, but they should only get the single history entry until they switch to a new page, if they ever do.

Also: Algorithmic generated feeds where you try to click on one thing, but you click on the next thing in the list and when you click back, the feed looks completely different because it has new information on you. That thing you wanted to click on is gone and will never return.

That's actually how I do my Lemmy feed. I have one chance to comment on a thread and if I don't do it, when the page refreshes I lose it forever.

I've learned to accept that there are just some things the universe never wanted me to comment on.

I'd love that, my entire frontpage is the same 30 things over and over unless I deliberately sort for something then it's a DIFFERENT 30 things over and over

Try some different sorting options. I've found "Active" and "Hot" to be kind of shitty (though to be fair, I haven't really used them in like 6 months so maybe they're better).

I usually go for "Top 6 Hours" or "Top 12 Hours" for stuff that's not too old and relatively active.

thats the reason why i always open links with middle click to open a new tab. helps with the above fuckery too.

...and now you've hit upon my other peeve: (mostly shopping) sites coded to disable browsing links in a new tab...

Perhaps it's because I never raw dog the web, and using uBlock Origin on "medium mode" somehow fixes it, but I don't think I have ever experienced that.

I have experienced sites that block right clicking, and that has always infuriated me. But I was able to get a little FF extension that disables right click blocking on websites. Which is pretty useful for downloading videos on sites that try to stop you from downloading their videos (though some have wisened up and can completely disable the ability to save a video through that method. The "save video as" option is completely greyed out). yt-dlp usually works in those cases, or one of the countless web-based video downloaders... but still annoying.

...ah, i may be conflating contextal menus with opening new tabs, since that's the primary UI mode i use to do so: regardless, any kind of shenanigans which aim to disable application-level UI get under my skin...

Hate that on YouTube…

What's worse is that YouTube sometimes doesn't do that, i.e. when you hit back it shows the same list from the cache or something. It gives you hope and makes it worse on those occasions when it does fully refresh on back.

Youtube recommended videos does this. Not a huge issue because I can always search for the video myself but it's annoying.

Ugh yes.

Though on desktop I've completely switched over to using FreeTube, and I've been loving it. The order of the videos in the feed does not change. It's great.

I don't understand why browsers support this "functionality".

It's not for this, of course. It's because in the world of single page applications built in react and angular where there is no physical back, like no actual server page to go back to just JavaScript, you have to code in what the back button means. Even though there's no server calls to ask for a new page. New page. Most people still expect that forward and back will still go forward and back in standard navigation.

Sites like this it's pretty clear that they just overwrite that with the last 20 calls to their own page, but the alternative is that single page applications would not be able to have forward or back functionality

if(this == this.previous) continue;

Great I'll just add a unique guid to each path that is ignored and returns to the same place. You show me a 10 foot fence I'll show you an 11 foot ladder.

I mean, I get that. I was making a joke. But 12 ft fence? Load in sandbox and compare html. Your move.

13 ft ladder: <span></span>

14 ft fence: Diff in html. If less than 10 lines different, ban.

It's a very "dumb" implementation of a generally useful feature. Browsers don't keep track of how many times you're redirected to the same site or try to consolidate the back-button list accordingly, but they certainly could. Wouldn't be surprised if there was a plugin to this effect.

They actually do. To avoid infinite loops. If a URL redirects to the identical URL for more than ~5 times most browsers will refuse to load and show an error instead.

That's why sites like this will generate new URLs with the same content.

I was just thinking about this.

Super annoying because it can actually be fixed by using History.replaceState() over History.pushState().

I guess the reason they do it is either to keep you stuck on their sucky site, or just incompetence.

You're right, but "incompetence" seems harsh. Maybe I'm just sensitive today.

Hanlon's Razor: Don't attribute to malice what can be sufficiently explained by stupidity.

I feel like when you're talking corporations, hanlons razor needs to be reversed. Never attribute to stupidity what could be adequately explained by malice. We'll call it Nolnahs razor.

Corporations are run by stupid humans though.

idk, it seems like with this being a company that generates revenue from "clicks" doing something that essentially makes a person refresh the page 20 times seems like a good decision to make

Big Hanlon fan, but I don't think stupidity is enough to explain why the site behaves that way.

I'm not a fan of Hanlon's Razor, because I feel like people believe it to be some kind of steadfast law of the universe when in reality it's just a "rule of thumb." And honestly not even a great one imo.

I feel like there are a whole lot of bad people that use the concept as cover to help them get away with the heinous shit they do. People who do not deserve the benefit of the doubt.

Microsoft does this with the Xbox forums and it bothers me so much

MS does this with ALL their forums, and it’s cunty.

MS does this. They do it everywhere.

Quickly going back twice always works with MS forums. First page logs you in (or fails) and the second is the page you wanted to go.

Only the first time you visit in a while though.

I think it's taking you away to a login page, logging you in, then bringing you back.

I can see the point if you were going to ask or answer a question, but 99% of the time you just want to see how somebody else didn't get their problem solved by some random Indian guy who people assume works for Microsoft, who think the solution to everything is running "sfc /scannow" which has replaced chkdsk as the command most likely to take a long time, do nothing, and make the question asker go away without a solution to their problem.

Open all links in new tabs.

This sounds horrible. I already have a tab issue

Either use tree tabs, or just close it when you're done.

You’re clearly using tabs wrong….

No, my browser (Mullvad) clears everything upon quit. I quit every time I get on a new "subject".

What helps with this is clicking links with mousewheeldown, I automatically opens in a new tab. Also MWD on the tab label will close it, so you don't have to aim for the 'x'.

A mouse with thumb buttons is really handy as they do foreward and back, double clicking that gets you out of the issue caused in op

Couldn't be me. Opening links in a new tab master race

Three things.

  1. Yes. Sometimes this is malice. Sometimes this is an attempt to drive impressions and page views.

  2. This can also be caused by poorly configured web applications that update in real time. If, say, some sports website is giving you real-time data about the game as it progresses, a poorly configured web application might be creating a dynamic URL for every change. When you access the older page, it will be instructed to take you to the most recent data, so pressing back is taking you to old data on that page, and then immediately realizing that data is old so refreshing it with the most relevant data.

  3. This is a super common misconfiguration in single page web applications. Domain.com will take you to an application that renders at domain.com/en-us/home. Pressing back takes you to domain.com, and guess what happens next?

This is basically 99.99% of these cases. I would say if its on some shitty news site with 1000 ads that somehow sneak by AdBlock and UBlok Origin, it's case 1. Otherwise, it's case 2 or 3.

The picture instance is either case 1 or 2.

Microsoft website does this (especially their useless answer), I guess it's malice

MS makes a redirect to log you in, you can hit back button twice to escape. Bad design but not malice.

and neither case provides a service in a state that should be exposed to the outside. Either due to malice or incompetence.

Any website managed/developed by someone certified in the last decade or more knows not to do that.

It’s absolutely malicious, both to drive SRO and to keep “accidental” clicks from backing out so quickly

This is one of the absolute greatest reasons to support opening most everything in a new tab (as long as you don't end up like my mom who at one point had over 100 tabs on her phone). Doesn't matter if it's a link from the same website, from a search engine, or whatever else there is. New tab.

Then on android Firefox you accidentally hit the back button and it closes the tab and you can't go forward and you already navigatedc away from the originating page on the other tab forcing you to open your history and try to figure out where the hell it is.

Ctrl Shift T doesn't work on that case?

Edit: I skipped the Android bit, sorry.

Edit 2: From the 3 dots menu INSIDE the tabs view you can access a list of recently closed tabs, not nearly as fast as a 3 key combo, but maybe better than looking for the tab in the history. Also apparently there's an extension that may help.

I've always wondered. Is there really a benefit to a ton of redirects like that? Like, do they gain anything by making it harder to back out?

Or is it just extremely incompetent website programming?

I always just assumed it was a form of "dark pattern" meant to try to stop people from leaving their website once they've entered (e.g., coming from a different site, you can't just hit backspace or click back to immediately exit their site. You're stuck now).

I think that's right for a website where you accidentally clicked an ad and now it's trying to convince you you have a virus and you need to download their virus to remove it. Or maybe for an ad pop-up where annoying you might increase the chances that the content makes it into your brain.

But for a news website i have trouble seeing the logic.

News websites get revenue via ads. This makes people load the same page again, loading the ads again.

I'd have expected ad providers to catch on pretty quickly that there's cheating involved, no?

Nope. They just hear back about number of views and how it influences the shoppers and brags about how it works.

I honestly think it's mostly the idea of advertising that keeps it running as an industry.

Like Facebook juicing their video viewership and recent news about Google using off screen ads in their views and impressions numbers.

They also get paid off of this, the advertiser pays for those impressions.

Advertisers can't switch because they can't not be present on big platforms. The whole ad industry is just companies scamming each other and the consumer.

Any page that makes their revenue through ads do everything they can to maximize engagement, and that means keeping them on your website as long as possible. So any little thing they can do to that end, they will.

microsoft does this with their community support/forums/whatever and it's annoying when you're trying to look up a problem in google. :///

Double-clicking the back button usually works for me on Firefox

Holy smokes I never realized this intended behaviour, but of couse it is...

Out of curiosity how old are you?

I'm 31, in my defense I was exhausted on tuesday...

Alright lol so long as you understand being forged by the fires of the early internet deems you responsible to be aware of such tomfoolery against us internet patrons. Convince 10 computer illiterate friends to install ublock origin and all shall be forgiven haha

You've reminded me of a similar frustration that I've never found the answer to - though it may be adblock related - in that whenever I open a link to eBay it completely wipes the history for that tab. Or possibly it opens a new tab and kills the parent. Either way I always forget about it until the next time and then it drives me mad all over again.

Reddit has been doing this when I click a result from a Google search (yeah, sometimes you have to)

It’s fucking annoying and I hope whatever JavaScript trick lets them do this gets blocked

I use a Firefox based browser and this hasn't happened to me, are you using Chromium or Safari? Could be a browser specific issue

Firefox. I'm fairly convinced it's something to do with UBO or one of the blocklists but I've never taken the time to dig into it properly.

Aren't they scamming their advertisers too? Because if you click the back button a bunch of times it's gonna reload a bunch of them on every click. At least if your internet is fast enough.

Impressions are usually deduped, meaning multiple impressions from the same user during the same session are just counted as one. The big ad networks are extremely careful to avoid miscounting of any sort and will generally err on the side of undercounting rather than overcounting (since telling advertisers they got more impressions or clicks than reported is way better than telling them the numbers were accidentally inflated). Of course, there's the occasional bug, but it mostly works as expected.

I just realized you meant data deduplication instead of "not duped by you bitches anymore"

lol yeah I should have been clearer

Does it also cover reloading with different ads? (such that it would count impressions for different advertisers)

Usually the ad needs to be in your viewport for at least a few seconds to count as an impression. If you were just going back quickly, or quickly refreshing the page, it won't count. If you go back or refresh, see a different ad, wait a bit, then refresh again, I think it'd count.

For skippable ads on YouTube, the advertiser only pays if you watch past the point where you can skip it. If I remember correctly, you have to watch at least 30 seconds of the video (or the full video if it's less than 30 seconds) for it to count as a view.

What makes me angry here is, I am 90% sure the browsers could code against this.

If the user clicks a control on a webpage one time, the stack can declare "One user click! You have earned yourself One (1) navigation." Then, the click activates some JavaScript that moves you to a new webpage. That new webpage has an auto-loader redirect that instead runs a 300ms timeout, and then takes you to some other page. The browser, meanwhile, has seen this, and establishes "We are still only operating off of that One (1) click. So, instead of adding a new page to the user history, we'll replace that first navigation."

I have yet to hear a satisfactory reason as to why that's not possible.

We just got vertical align last month. There's so many things they should be working on but are too busy trying to add more ads or monetization features.

I think the web is just too long in the tooth at this point but there's nothing we can do.

CSS features like vertical alignment would be defined by web standards. Those fall under the non-profit org W3C. They're pretty slow about things as to not break the fuck out of everything.

Browser behaviour like merging redirects falls on browsers tho, so yeah, we can blame Chrome or FF on that one.

Still waiting for CSS Color 4 so SVG gradients don't look like shit. sRGB gradients are completely broken.

I think there was an extension named Skip Redirect that solved this issue...

Motherfucker put a trigger warning on that shit

YouTube does this. Infuriating well beyond mild.

The got some kind of resource leak too. I just close my browser sometimes lol

yo honk honk am here to help. Right click the back button to bring up a menu of several previous pages select when it was the search engine or whatever you used before. For Firefox. If you're on chrome, you can cry. Honk honk, goose out.

On Firefox you can also hold your left click on the back arrow for the same effect.

Goose says "Gaa-ga"(Hauge)

just click again, but fast enough to get the redirect, but not too fast to miss it and double click, and try not to do it a third time or you're going back a few ages.

Google translate does this, too. This not only pollutes the back button, it also pollutes the entire browser history.

Deepl is vastly superior to Translate btw

Edit - look at these knobends 👇

This is what's wrong with the internet now, some wank coming up with a massively niche reason why every comment is wrong.

Use a mix of both you insufferable fucking plonkers

Seems cool, but it's currently missing some pretty important languages (Hindi, Urdu, Thai, Bosnian/Croatian/Serbian, Swahili, etc). I'd put up with something limited like this if it was FOSS and/or selfhostable but it appears not to be

Exactly. Also, it doesn't have Latin (used for both scientific terms such as "Athene Cunicularia", philosophical such as "Homo homini lupus est", as well for liturgical and ritualistic texts, especially occult texts) nor Hebrew.

While it offers a concurrent alternative to Google translate, it still lacks some features, as @murtaza64@programming.dev mentioned, many languages are missing. In my case, I sometimes experiment with terms across various languages, sometimes Hindi ("O param Devi Kaali"), sometimes latin ("Vita mortem manducat, Mors manducat vitam" is a latin phrase I wrote myself, following Latin grammar rules), sometimes Hebrew (especially for Gematria calculation using numerical values from Hebrew letters (Aleph is 1, Bet is 2, Gimmel is 3, and so on) after translating/transliterating a word/name such as "לילית"). For these kinds of experimentation, DeepL can't really be of use, so I need either Google Translate or Bing Translate (both support the aforementioned languages).

You can right click (long press on mobile) to skip back to the page that took you there

That’s what OP has done; that’s what we’re seeing in this screenshot.

The back button is highlighted. This list is the list of options OP gets when he right clicks the back button.

I don't see evidence of them skipping back two pages past the point in history that redirects which is what prompted my comment.

This is why I have dozens, if not hundreds of tabs open. Usually I open links in a new tab so I can easily tab back to where I came from. Using a hierarchical tab manager makes this work better because when you're done with the topic, you close the whole branch... theoretically.

This tactic also seems targeted at mobile users where it's harder to break the loop.

Not sure about that site specifically, but others that's done it to me was easy to get around. Most of them are thwarted with basically double clicking the back button.

As the screenshot illustrates, the redirects have been repeated many times to thwart that strategy.

I get that, forgot to mention that clicking the back button very very fast is what usually works for me.

Regardless, it's annoying af

Press and hold the back button. A lot of times this will show a history where you can select a page further back.

is there by any chance like a ublock filter specific for this?

Well enjoying a game of footie is your first mistake. Oh wait, I got confused, too many euros around, sorry about that. Footie is what I call soccer, aka foreign football.

Enjoying a game of football is your first mistake.

What is the point of this comment? I'm curious as to what you were trying to achieve here.

They were trying to be cunty, and in that they were a success.