Live data from Hacker News

A new spam policy for “back button hijacking”

developers.google.com

91–100 of 532 posts

Re: A new spam policy for “back button hijacking”

#92
post #47

Earlier quoted context omitted.

I've always found that behavior baffling so it's interesting to hear someone using it as intended instead of being frustrated by it.

i love it. my mac doesn't have the home row (don't know if that's how that row of buttons is called) so I use spacebar and shift+spacebar as pgdown and pgup when I am reading

They're called the navigation keys. Fn + Up/Down (arrow keys) is PgUp/PgDn, and Fn + Left/Right is Home/End. But of course, those keys are on completely opposite sides of the keyboard, so Space is more convenient.

Re: A new spam policy for “back button hijacking”

#94
post #47

Earlier quoted context omitted.

I've always found that behavior baffling so it's interesting to hear someone using it as intended instead of being frustrated by it.

i love it. my mac doesn't have the home row (don't know if that's how that row of buttons is called) so I use spacebar and shift+spacebar as pgdown and pgup when I am reading

[fn]+[up arrow] = pgup, [fn]+[down arrow] = pgdown, [fn]+[left arrow] = home, [fn]+[right arrow] = end

Re: A new spam policy for “back button hijacking”

#96

Earlier quoted context omitted.

Please explain the legitimate uses. Not once I have ever encountered a website that does something useful by modifying the behavior of my browsing history.

Any single page application, such as YouTube, Gmail, or discord. It lets persistent content (videos) or connections (chat) persist while emulating a pagenated browsing experience. When it's done right you don't notice it at all.

(rant warning)

Well, if I wanted to return to the parent screen in a single page application, I'd click on the back button in the app itself. No need to prevent me from back tracking in the exact order of my browsing should I need it.

I especially hate YouTube's implementation, I can never know the true state on my older PC during whatever it's trying to accomplish, often playing audio from a previous video when I backspace out. I resort to opening every link in a new tab.

Re: A new spam policy for “back button hijacking”

#98

Easy fix: JS doesn't let you change back button behaviour. Q. But what about SPA? A. Draw your own app-level back button top left of page. Another solution: make it a permisson.

Why not just put up a fake captcha page? When the user clicks the link to continue, the back button is now hijacked.

Re: A new spam policy for “back button hijacking”

#99

> Notably, some instances of back button hijacking may originate from the site's ... advertising platform I feel like anything loaded from a third party domain shouldn't be allowed to fiddle with the history stack.

There are valid use cases however the issue is rooted in lacking browser APIs.

For instance,

- if you want to do statistics tracking (how many hits your site gets and user journeys)

- You have a widget/iframe system that needs to teardown when the SPA page is navigated away

- etc

The browser does not have a;

   globalThis.history.addEventListener('navigate')
So you must monkey patch the history API. It's impractical from a distribution standpoint to embed this code in the page bundle as it's often managed externally and has its own release schedule.

Re: A new spam policy for “back button hijacking”

#100

> Notably, some instances of back button hijacking may originate from the site's ... advertising platform I feel like anything loaded from a third party domain shouldn't be allowed to fiddle with the history stack.

Nothing loaded from the web should be able to fiddle with any browser behavior, yet here we are.
Post reply on HN