Comment on Websites that hijack your back button must stop by June 15 or face Google's wrath
lvxferre@mander.xyz 9 hours ago
I’ll expand here what I mentioned in another comm.
Most back button hijacking relies on the browser history API. Further info here: “The replaceState() method of the History interface modifies the current history entry, replacing it with the state object and URL passed in the method parameters.”
So for example. You visited site A, then site B. Your browser stores this as “user went A then B”, so if you click the “back” button while navigating B, it sends you back to A. However Javascript in the site B can tell your browser “no, the user didn’t visit A then B. They visited C then B”. So as you click “back” you’re sent to a third site you never visited.
Why is this anti-feature there on first place? Why are sites even allowed to interact with your history? Because corporations really, really, really want to know your browsing history: which sites are directing traffic to it site, which pages within that site you visited (imagine those pages show you products you might potentially buy), so goes on. It has practically no reason to exist for non-commercial sites. Now remember Google is a corporation, it profits the most from advertisement, and has a role in the web standards, and you’ll notice Google was at least partially responsible for this anti-feature.
And now, the same Google is using its monopoly over search to dictate which should be the rules for the usage of the anti-feature it added. As if the internet was Google’s property: it’s who decides which features should be on the internet, and how you’re allowed to use them.
Moral of the story is: even if it looks like Google is doing something good, remember they were responsible for this mess on first place.
schnurrito@discuss.tchncs.de 9 hours ago
I thought it was there because otherwise, single page applications (e.g. Angular) wouldn’t have a functioning back button? Am I misunderstanding this?
traxex@lemmy.dbzer0.com 43 minutes ago
You are correct. I’m against web tracking but this isn’t the crazy feature the other poster is going on about.
lvxferre@mander.xyz 8 hours ago
Single page applications are only a necessity because pages are expected to be huge behemoths, so requesting a new page would take too long and put a burden on the server. And that is mostly the result of corporations bloating their sites with advertisement, to the point our expectations on what’s an acceptable page size became distorted.
(Note Angular was released by Google in 2016, and the anti-feature is from 2015. I don’t think this is a coincidence.)
pivot_root@lemmy.world 7 hours ago
SPAs have their place in the ecosystem. Don’t blame the technology for developers or more likely their managers being shitty.
lvxferre@mander.xyz 7 hours ago
If you develop some feature (or bug!) of course some people will find a decent way to use it. That doesn’t mean the feature should be there on first place, specially when the possibility of abuse is so obvious. Plus if the pressure behind this anti-feature was “only” single page applications, and nothing else, I bet it would be implemented in a different way.
Also, look at the big picture. In isolation, one could argue giving pages access to your browsing history was a necessary albeit poorly thought feature; but when you look at other stuff browsers nowadays are supposed to do, you notice a pattern:
Are you noticing the pattern? Those “features” are somewhat useful, with obvious room for abuse, and that abuse is usually from people who want your money.
Worse: all of them crammed into what was supposed to be a system to show you content, but eventually got bloated into a development platform, transforming browsers into those bloody abominations of nowadays, with a huge barrier of entry, dominated by a single vendor (and where the vassal of said vendor got ~3% market share). I’d say that not having a monopoly is more important than all those features together.