by bunga-bunga · 3y ago · 0 comments
Twitter handles this masterfully (or used to)
> or page refresh.
Technically you can use history.replaceState to store, ahem, state on the "current page", so nothing stops you from saving a cursor there to use when loading the content.
The issue with infinite scroll is that very few people know how or care to "make it work correctly"
But once you call history.pushState, the browser is relinquishing control to you. At that point, going “back” only changes the URL, as far as the browser is concerned, and that part is instantaneous.