3 ms·
I've been wanting to play around with "scrolling pagination" as opposed to an "endless pagination." Where items are removed from the top of the list as they are
by harisenbon 15y ago
I've been wanting to play around with "scrolling pagination" as opposed to an "endless pagination." Where items are removed from the top of the list as they are added to the bottom, so you have a low-memory version of endless pagination.
Curious how much havoc that would wreck on the scrollbar & swipe scrolling on mobile.
- ChrisLTD 15y agoThat's a cool idea. If I recall correctly, that's how table views work in iOS.
- threecreepio 15y agoI have a site in progress that's used an endless paging with a sliding window, so after 5 pages it'd clip the top page. It was a little irritating in that you could notice that something different was happening with the scrollbar once you hit the limit, but other than that it did work well on mobile devices. In the end we had to replace the endless bit with a big "load more" button though, for unrelated reasons.
- zackham 15y agoWhen you remove your content, measure it first and keep your new content properly offset. This way the scrollbar won't change since your new content is positioned correctly. The old content is removed from the DOM, but the space it took up is still accounted for.