5 ms·
There are probably things the web developer can do to minimise memory consumption, though there isn't an obvious solution. That said, the problem of losing you
by ldjb 11y ago
There are probably things the web developer can do to minimise memory consumption, though there isn't an obvious solution.
That said, the problem of losing your reading position can be solved using something like history.replaceState(). As the user scrolls, update the history entry with a reference to the current reading location. Then, when the browser restarts, the website can know where the user was previously at and can return them to that location. This is the approach Discourse uses [1]. Alternatively, I suppose cookies could be used, but that's a slightly messier solution, imo.
Unfortunately, I haven't seen many websites adopt such a feature. Which is a shame because infinite scroll can make for a great user experience -- if done right. But too many websites actually suffer as a result of poorly implemented infinite scroll.
[1] https://eviltrout.com/2013/02/16/infinite-scrolling-that-works.html https://eviltrout.com/2013/02/16/infinite-scrolling-that-wor...
- codedokode 11y ago> Alternatively, I suppose cookies could be used, but that's a slightly messier solution, imo. Cookies are shared between tabs. You should use URL or builtin browser capabilities (remembering scroll position on a page) for this purpose. Infinite scroll has other UX problems. For example, you cannot see the footer of a page or cannot navigate to the items by page number. As there is no page numbers you cannot even remember how to find some item.
- ldjb 11y agoNot necessarily. Though it's true that many implementations have these problems, they're not inherent to infinite scroll. Regarding footers, who's to say the footer needs to go beneath the infinite scroll area? You could instead place the contents of the footer in a sidebar that stays in a fixed position. Alternatively the footer could be overlayed at the bottom of the page so it is always visible (a recent design trend would have it hide when the user scrolls down, but reappear when the user scrolls up). As for page numbers, there's nothing stopping you from adding them. Each item should probably have some sort of permalink to allow you access it directly, and there should be suitable navigation to allow you to find individual items. I find it quite sad that infinite scroll gets a bad rap due to poorly designed implementations. Perhaps it will get a better reputation if more websites actually put some thought into how infinite scroll is used.