Comment on Tom's Hardware now hijacks the back button.
pivot_root@lemmy.world 22 hours agoMight be that there’s some way of blocking that behavior if you don’t like it, though, if I’m not seeing it.
Not without either breaking most SPAs (Single-Page Applications) or writing userscripts with site-specific logic.
The classic way of doing this crap was to make a placeholder page navigate to the article page. That leaves the redirect page in the history stack so when the user presses the back button, it just opens the page that navigates them forward again.
The modern way is to use the history API with history.pushState to add a history entry while listening for the popState event to check if the user pressed the back button. Unfortunately, both of those features have a legitimate use case for enabling navigation within a SPA.
MagicShel@lemmy.zip 22 hours ago
Honestly though, as both a developer and a user SPAs could get fucked for all I care. I don’t think it’s a requirement of SPAs, but they seem to do so much unnecessary bullshit. So many bad development practices. I don’t hate the concept of SPAs, but it’s clearly just asking too much of the average contract developer.
pivot_root@lemmy.world 21 hours ago
As a developer as well, I agree that they can get fucked. Bloated crap that wastes bandwidth and ruins first-time-to-paint on mobile devices by necessitating downloading and initializing a multi-megabyte bundle of npm packages.
As a user of the internet, I need websites to work, however. I would have disabled JavaScript entirely by now if it weren’t for the fact that doing so renders what feels like half of the entire web unusable.