Nathaniel Beaver, September 7, 2012.
Updated and expanded February 2015.
Summary: Install this userscript if you like to read webpages all the way to the end, one screenful at a time.
I read a lot of documents on LCD computer screens. PDFs are annoying to read on most displays, since the PDF is usually a letter-size portrait orientation, whereas most displays are landscape orientation. PDFs also can't be reflowed and waste a lot of space in the margins, which makes them painful to read on small or narrow screens.
HTML rendered in a browser, however, can reflow to fill whatever screen it's displayed on, and with proper use of CSS can be made readable on any display. You can change the font, resize the text, even change the CSS if you want. HTML is flexible and continuous in a way that PDFs aren't and were never meant to be.
HTML also tends to be nicer for skimming a document. PDFs render a page at a time and so rapidly flipping through a document is harder.
When HTML doesn't fit one one screenful, you can either scroll or page down to see the rest. Most people scroll, which used to require clicking and dragging on the scroll bar, but is easier now that we have touch screens and scroll wheels. Scrolling is hard on the eyes because it takes a lot of effort to track moving text.[citation needed] It's also slow; that's one reason why humans invented the paginated codex in the first place.
I find reading by screenfuls using spacebar or page down to be a natural way to read documents, although I realize there are those who disagree. I love the page down capability, because it is similar to reading a book, but keeps some continuity between ‘pages’. The text stays still until I get the bottom of the screen, then I page down and flick my eyes up to the top of the screen. Beautiful.
However, there is a problem with reading HTML that is a result of browser implementation, not intrinsic to the format.
Suppose I am reading an HTML page that is a screenful and a half long. When I page down, the browser will not move the bottom line of text to the top of the screen. Instead, it will put the end of the document at the bottom of the screen, ignoring any attempt at continuity.
I think of this as “bottoming out”, since it gives a jarring sensation when reading reminiscent of a car's suspension dipping down too far and smacking into the dirt. PDF documents have to do this because they must preserve the typographical layout, but webpages have no reason to break the flow of reading at the end.
Contrast this with moving forward a screenful in text editors like
Emacs
(C-v
)
or
Vim
(C-f
).
They move the line at the bottom of the screen to the top of the screen,
regardless of how many lines the file happens to be.
Emacs adds some unreachable blank space at the bottom,
and Vim puts cute little tildes to show you're past the end of the document,
like this:
~
~
~
The venerable Unix terminal pager
less
calls this forw-screen-force
,
which is mapped to Esc-Space
by default;
the manual page notes this this command
"scrolls a full screenful, even if it reaches end-of-file in the process."
However, it doesn't do this for Space
by default,
which has provoked at least one less
user to
complain.
Fortunately, the keybindings for less
are pretty easy to
customize.
I don't want to claim that web designers are completely unaware of this difference; after all, many webpages have big footers or long comment threads that pad the bottom out nicely. However, since most people I know scroll with the mouse instead of tapping spacebar or page down, and tablets and smartphones don't even have a page-down key, I'm guessing this is more of a happy accident than an intentional improvement.
In any case, after using Vim I realized how nice its consistent screenfuls are for editing text, and how annoying this feature's absence is in web browsers, especially articles that are unnecessarily chopped into pages so that the site can slap more banner ads at the top.
I'd found ways to combat blurry scrolling, irritating ads, unnecessary pagination, and annoying sticky headers, but there was nothing I could do about bottoming out on the last screenful. I resigned myself to inferior browsing, since nobody seemed to notice or care enough to fix it.
That is, until now.
The results of my experiment are on this very page. It will not bottom out on the last screenful, because there will be tildes padding the bottom as needed.
If you want to install the userscript, you will need to install Greasemonkey for Firefox or Tampermonkey for Chrome/Chromium. Next, install the userscript directly from the source of this page. (I had posted the script on userscripts.org but alas, userscripts has been dead since May 2014 and is not coming back.)
The implementation is in plain Javascript and requires no libraries, so it will work offline for e.g. reading documentation. It works by appending an empty div to the end of the body and listening for scroll and resize events. While it works fine for most websites I have tried, it does have difficulties with absolutely positioned elements. Suggestions for improvement are always welcome. ∎