But: I've always wondered who uses these "back to the top" buttons, and why?
Until quite recently I hardly ever had reason to go back to the top of the page—I was much more likely to click a link or click the back button—and if I did a quick tap of the home key or flick of the touchscreen usually did the trick. Conveniently, both gestures work even if you've not gotten all the way down to the "back to the top" button.
More recently with Chrome on iOS I find myself wanting to get to the top so I can use the pull-down-then-right gesture to close the tab. With really long pages sometimes a single flick isn't enough to get me all the way to the top—but then, on a really long page I'm also unlikely to have gotten all the way to the bottom.
And is frustratingly, conspicuously missing in Android. Every time I switch to my Android tablet, it's becomes a hugely missing piece for any content consumption app that scrolls.
This also works in most apps, unless they’re using some weird nonstandard UI (which is, perhaps surprisingly, less common on iOS than on macOS). And it works with Reachability. Neither of which are especially discoverable, but super handy if you know about them.
Except on AMP pages or on weird custom front ends. Long love plain html and css. Please don’t override the platform default scroll acceleration either!
There's usually some combination of the Home key that does the same on most desktop browsers, but the control key varies by OS and sometimes browser.
What there isn't on iOS as far as I'm aware is a way to scroll to the bottom. On infinite scroll pages accidentally navigating away as one can easily do with touch screen results in a lot of frustration.
You scroll as far as the browser lets you. Then the page resizes, and you scroll again. If you know you were about 5 pages down, this is shedloads faster than scrolling by hand like a chump.
I think back in Ye Olde Days it was harder for people who just had a scrollbar, and weren't necessarily all that familiar with that, either.
There has never been a technical need for it. The "Home" keyboard button when pressed on a web page has taken you to the top probably since the very first web browser was released. But there's a lot of computer users for whom that entire complex of keys off to the right of Enter on a standard keyboard is The Outer Hinterlands, Where There Be Dragons, except for maybe the arrow keys. Also the entire line of function keys. Not everyone is an expert.
Reading your post I realized that I have not pressed a Home button for years. Now I have a strong Home button (and full sized keyboard in general) nostalgia and cannot sleep!
I will just go ahead and press it next time I see a full sized keyboard I swear!
Yeah, in the days where fixed nav at top is often used by default it is not as common to have TOP links any more. Recently I searched for a way to PREVENT going to the top clicking a link <a href="#" onclick="console.log(1)"> that only had JavaScript in it and always jumped back and forth due to AJAX page reload.
The solution[1] I found was using <a href="#!" onclick="console.log(1)">A no jump link</a>.
On a slight tangent, links should not be used as buttons - please use a HTML button and style it with css. Links-as-buttons tend to interact poorly with things like opening in new tabs, and it's not the semantically correct use of the element anyway.
> If clicking the link without javascript doesn't do anything without Javascript, it should be a `button`
I think it was more of a thing in a bygone era when scroll wheels and swiping didn't have that inertia effect to get you to the top efficiently.
Nowadays you just swipe down fast once and the inertia gets you to the top but it used to once not be like that, and you had to thumb your screen 15 times to free solo your way to the top.
But: I've always wondered who uses these "back to the top" buttons, and why?
Until quite recently I hardly ever had reason to go back to the top of the page—I was much more likely to click a link or click the back button—and if I did a quick tap of the home key or flick of the touchscreen usually did the trick. Conveniently, both gestures work even if you've not gotten all the way down to the "back to the top" button.
More recently with Chrome on iOS I find myself wanting to get to the top so I can use the pull-down-then-right gesture to close the tab. With really long pages sometimes a single flick isn't enough to get me all the way to the top—but then, on a really long page I'm also unlikely to have gotten all the way to the bottom.