Quite often on pages with infinite scroll you might face scenario:
- you're scrolling a lot,
- then you click some link from inifinite list,
- you dont like what you've clicked
- so you go back
- you'd like to continue scrolling from the point you've left.
- but all items you were scrolling are not there and you need to scroll everything you've already seen again.
How do you handle those situations? Do you know any solution for that? Is there any way to save state of page or at least know what this situation was and load proper ammount of infinite list and scroll user to last seen item.
This is a very generic approach and will need customization depending on what kind of front-end framework is being used.
scrollTop maintains the vertical scroll position, so if you find a way to memoize scrollTop, you can always come back to the same position where you last left.