Ask HN: Why is there no way to prevent scroll-jacking on a webpage? - ValentineC
======
Y7ZCQtNo39
Fortunately, most sites don't do this. I don't understand why it's done in the
first place, though.

It's mentally agitating when I go to scroll on a webpage and it doesn't do
what I expect.

And what content authors should be most concerned about: it distracts viewers
from the site's content, because I'm thinking "what just happened to my
mouse". And that reaction is the antithesis of what content creators should
want: they should want to engage me, and explore the site more deeply.

~~~
dethswatch
My best guess has been changes they've made to slow down scrolling on ipads
and similar.

My follow-on guess is that management figures you're scrolling past the adds
too quickly.

------
makecheck
A general-purpose scripting language and general-purpose elements, where it
isn’t easy to see what the high-level impact of low-level actions will be.

Though we’re at the point where browsers really _need_ to clearly separate
what _requires_ advanced capabilities from what really _doesn’t_. For example,
a browser could always display exactly two tabs per page: “Read” and
“Interact”, where ONLY the Interact view can access scripting capabilities and
dynamic content and the Read view may only display trivial things like images
and text. If you’ve ever installed something like uMatrix on the desktop (and
you should), it is _astounding_ how much crap from how many entirely different
domains is loaded _and executed_ just by loading a “simple” page now. It has
to stop.

------
MattGrommes
Oh man, if there was a way to find sites that use that new mobile pattern
where the ad slides up as you scroll down, I would nuke all of those sites
from orbit.

~~~
Y7ZCQtNo39
Stop visiting those sites -> ad revenue dries up -> problem resolves itself.
But my approach is woefully idealistic.

~~~
tedmiston
Besides ad-based sites, some of the sites that I've seen scroll-jack the worst
are small hip restaurants. To some degree Facebook and Yelp have started to
make restaurant sites irrelevant but I still end up clicking through
frequently for the most up-to-date menu.

------
matt4077
Because, in most cases, it wouldn't work. Most pages using scroll-jacking
create and/or show certain layers upon scroll. The content isn't there before.

There are some, like I believe most Apple product pages, where scroll-jacking
is used to create a one-slide-at-a-time-effect where it may work. But even on
those, individual slides often undergo transformations upon scroll revealing
information you'd otherwise not see.

------
dguo
Here is a Chrome extension that claims to be able to prevent it:
[https://joshbalfour.github.io/disable-scroll-
jacking/](https://joshbalfour.github.io/disable-scroll-jacking/)

~~~
burntrelish1273
That extension is no longer installable.

~~~
dguo
Looks like the author only recently submitted it to the store for review:
[https://github.com/joshbalfour/disable-scroll-
jacking#update](https://github.com/joshbalfour/disable-scroll-jacking#update)

------
josephorjoe
Because all major browsers support creating `onscroll` event handlers and some
people offer money to javascript developers if they will do annoying and
mildly evil stuff and a large number of those javascript developers say "Sure
boss, whatever you want".

The browser creators, people paying for websites, and (many) javascript
developers all seem happy with this, unfortunately.

~~~
majewsky
Problem is, `onscroll` is not bad per se. I really like those progress
indicators that some sites implement, esp. on mobile where the scrollbar is
not permanently visible. That's the (IMO) legitimate use-case for `onscroll`.

