Scroll control and hijacking
Moves the page scroll position and can change scrolling behaviour or capture the wheel.
In one line
Can scroll its own page and change how scrolling feels, but nothing else
Moves the page scroll position and can change scrolling behaviour or capture the wheel.
A site can jump the page, animate scrolling, restore position or block back-bounce. That helps navigation but also supports scrolljacking and trapping scroll inside a panel.
What it can and can't do
What the user does: You scroll or tap a link. Sometimes nothing: it can also move the page on load.
It can
- Scroll the page to a spot
- Stop the browser remembering your place when you press Back
- Capture the mouse wheel so scrolling moves a map or slider instead
- Stop the bounce at the end of a page
It cannot
- Scroll other tabs or other sites
- Change scrolling in the browser's own screens
- Stop you pressing Back or closing the tab
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 46 | 2015-10-13 | None |
| Edge | Supported | 79 | 2020-01-15 | None |
| Firefox | Supported | 46 | 2016-04-26 | None |
| Safari | Supported | 11 | 2017-09-19 | None |
| Safari on iPhone | Supported | 11 | 2017-09-19 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 46 | 2015-10-14 | None |
| Samsung Internet | Supported | 5.0 | 2016-12-15 | None |
How a site asks for it
| API | window.scrollTo({top, behavior}); history.scrollRestoration='manual'; overscroll-behavior; wheel listeners |
| Browser compat keys | api.History.scrollRestorationapi.Window.scrollToapi.Element.scrollTo |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | Per page view; scrollRestoration is a per entry setting |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Same origin only; cross-origin iframes scroll themselves |
Typical flow
- Page calls scrollTo or sets scroll-behavior
- Browser animates or jumps
- Optional wheel or touch listener calls preventDefault to take over
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Chrome treats wheel and touch listeners on window, document and body as passive by default, so preventDefault is ignored unless the page sets passive:false
- overscroll-behavior: contain or none stops scroll chaining and pull to refresh (Chrome 63, Firefox 59, Safari 16 partial per BCD)
- Browsers still allow keyboard scrolling and the scrollbar when wheel is taken over
- scroll-behavior: smooth respects the prefers-reduced-motion setting only if the site uses it
- Chrome limits scroll anchoring adjustments to prevent jumps from late loaded content
The story
What it is
A page moves your scroll position, changes how scrolling feels, or captures your mouse wheel.
For you
You notice smooth jumps to a section, a page that stops at each slide, or a chat box that scrolls on its own. Sometimes it feels hijacked.
For makers
Makers use scroll control for guided stories, infinite feeds and chat that follows new messages. Used badly it traps you. It also lets sites measure how far and how fast you read.
Where you see it
| Type | Example | Apps |
|---|---|---|
| news | A long form story keeps charts and photos pinned while you scroll through the text. | The New York Times |
| social | An endless feed loads more posts as you reach the bottom and remembers where you were. | Instagram, TikTok |
| messaging | A chat window jumps down as new messages arrive, unless you scrolled up to read old ones. | Slack |
| games | A browser game captures the mouse wheel to zoom the map or switch weapons, instead of scrolling the page. | None named |
| maps | A web map uses the wheel to zoom and stops the page behind it from moving. | Google Maps |
| ads | An ad measurement script records how far you scrolled so it can say whether you saw the ad. | None named |
| shopping | A product page shows a sticky buy button as you scroll. | None named |
Risks
- Scroll hijacking
- Tracks reading depth
What the platform says
- MDN: overscroll-behavior. Documents how a page can control what happens when a person scrolls past the end of a box.
Good uses and abuse
Legitimate uses
- Anchors and in-page navigation
- Infinite lists
- Maps and modals that contain scroll
Known abuse
- Scrolljacking that fights the person's input
- Trapping scroll inside overlays
- Hiding content under sticky banners
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2016-02, Chrome 46: history.scrollRestoration for single page apps
- 2017-03, Chrome 56: Touch listeners on window, document and body are passive by default
- 2019-03, Chrome 73: Wheel listeners on window, document and body are passive by default
- 2022-03, Safari 15.4: scroll-behavior and smooth scrolling support
Related capabilities
Related
- Touch events and touch point count. Can see your finger touches and how many touch points your device supports
- Pointer events (mouse, pen, touch detail). Can see where your mouse, finger or pen is and how it moves on the page
Sources
How well checked: Based on official documentation.