Windowed Infinite Scroll
In most implementations of “infinite scroll” that I’ve seen, new items are loaded and appended to the end of a list indefinitely, but old items are never removed. This means that scrolling is not actually “infinite” in the sense that eventually, you load too many items onto the DOM and your page gets slow!
I would like the ability to “unload” items at the beginning of the list once the list reaches a certain limit, and then to reload those things if a user scrolls back up (or in the opposite direction).
I’m curious to know if this is possible to achieve right now, and if so, how!
