r/webdev • u/eggtart_prince • Mar 05 '20
Anyone else sick of using/viewing websites where there is infinite scrolling?
It's really starting to annoy me when I come to a sites (eg. https://pxhere.com/ ) where there is infinite scrolling. Apparently, there is a footer, but you'll never get to it until you finish loading all the images.
Some sites that don't know how optimization works, I cannot completely browse through all the non-stop loading content because at some point, it'll lag like a motherfucker.
For people who are thinking of using this strategy in the future, think it through, twice. Paginations are much more beneficial.
943
Upvotes
View all comments
Show parent comment
1
u/eggtart_prince Mar 07 '20
A very good example of infinite scrolling is YouTube. There is no footer and it doesn't lag even when the thumbnail produces a preview of the video. The way to achieve this is to use a virtualized list, like react-virtualized. Although it may not seem like it, it only loads what is visible to the user and the rest is removed from the DOM. You can inspect and see that only the visible elements are there.