I hate sites with infinite scrolling, mostly because they use up all my RAM. Is there any way to convince websites not to load this way? Maybe a browser extension that turns it back into separate pages? A way to get the browser to report that it doesn't support it? Something I could uninstall?
There are several convincing reasons why the answer is "no".
Some sites add content dynamically (e.g. facebook) the moment you scroll down, so these are probably the cases you are not after.
Other sites add content dynamically independent of user interaction (such as scrolling). In principle, these could be handled somehow by preventing/throttling the responsible web connections once the page is full. However, trying to reenable this transparently in case you decide to go to the "next page" is probably doomed as one may expect the processes to have given up because of timeouts.
Then again there are pages that simlpy output lots of page content, maybe even static content. The client might simply kill the connection once there is enough to render a screenfull of data, but that means that to get to the "next page", you'd have to start loading the page afresh. With many pages, this wuld cause a lot of wasted bandwidth for useless reloads; also this may not be desireable in case of side-effects (such as online orders). Alternatively, the client might throttle the TCP connection until you select to go to the "next page". I'm afraid the web servers out there won't be happy (and drop your connection) with such a solution because it wastes their resources. Moreover, if you want to be able to flip back through previous pages, you still have the problem of needing to keep the full content in RAM or cache.
Yet another alternative would be to download the page completely and simply display it pagewise. But that is equivalent to what you have right now: scroll through a long page. You might only hope that most part of the memory footprint is in disk instead of RAM, so maybe this option is not too far-fetched.
All this does not take into account that the overall layout may require more or less th efull page content to decide what the "pages" should look like or where to break pages.
The only really feasible way I see is to make use of mechanisms that allow for paged display of the a priori unpaged content: to use
media:print styling, which would essentially amount to downloading the page and making a print preview. You may already have observed that many pages display awfully in print or print preview even though many styling options are available to web developers to address paging specifically, so imagine what you would get.
However, if one were to employ this as a (e.g. Firefox) addon, the workflow would be that the page downloads and will then be presented like in parint preview. Without going deeply into the bowels of the browser, this will still result in the full page being held in RAM, so not what you are after.
When using Firefox, one can use the add-on Kill Infinite Scroll, currently at version 0.79.4.
This add-on is described as :
This disables the infinite scroll used by Tumblr and other sites. In particular it cripples the scripts from http://www.infinite-scroll.com (version 1.4 and 2.0). Unlike the Anti Tumblr Infinite Scroll add-on, it just restores the original Next and Prev buttons.
I believe that restoring the Next and Prev buttons is preferable to just destroying the scroll, as one can still scroll but memory usage will stay just about constant.
You could use AdBlock/uBlock to block the code that loads the next page. This is crude, but works, for instance:
! Forbes infinite scroll (and all other AJAX) https://www.reddit.com/r/web_design/comments/4i6bpd/never_ending_scroll_down_on_some_websites_is_it_a/d2w3qj2 ||forbes.com$xmlhttprequest
I also tried these but they did not work:
But someone who is good with Adblock filter rules (not me) could develop a blocklist to block infinite scrolling on many sites.
Or use Add-Ons or Userscripts to override this behavior and replace it with something more user-friendly.
This Add-On kind of disables it on Tumblr, for instance: https://addons.mozilla.org/en-US/firefox/addon/anti-tumblr-infinite-scroll/ It still loads a new page automatically when you reach the bottom, which is annoying, but it replaces the current page instead of appending it, and demonstrates a proof of concept of what could exist.
I've tried starting a list here, but I'm not an expert at Adblock rules: