Comment on Websites that hijack your back button must stop by June 15 or face Google's wrath
schnurrito@discuss.tchncs.de 7 hours agoWhy is this anti-feature there on first place?
I thought it was there because otherwise, single page applications (e.g. Angular) wouldn’t have a functioning back button? Am I misunderstanding this?
lvxferre@mander.xyz 7 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 6 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 5 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.
pivot_root@lemmy.world 1 hour ago
I think you are misunderstanding what is possible with the history API.
Pages can’t read your navigation history.
Pages can’t manipulate history prior to their loading.
The original history API is a careless mistake. It can:
nentries.nentries.Seeing the length is a privacy problem. Allowing arbitrary forward navigation is a usability problem that’s ripe for abuse. Allowing back navigation to be more than a single page is a usability problem.
The newer
pushStateandreplaceStateAPIs are fine. As their names imply, they push a new URL or replace the current URL in the navigation stack. The URLs are also subject to same-origin constraints, so you can’t just replace the current page with an entirely different domain.Using a
replaceStatefollowed bypushStateto insert a dummy marker that runshistory.go(1)when thepopStateevent is fired allows pages to prevent users from navigating away from the website. That’s shitty and abusive, yes.Do you know what else can do that, though?
Or
Back button hijacking is an infuriating problem, but it’s not a new one exclusive to SPAs. This fuckery has existed for a long time.