3 ms·
My biggest problem with infinite scrolling in general is it clears scrolling state by browser back or page refresh. Sometimes there's no good result in the fir
by hamasho 3y ago
My biggest problem with infinite scrolling in general is
it clears scrolling state by browser back or page refresh.
Sometimes there's no good result in the first page,
or I want to keep searching for more investigation.
When I find a seemingly interesting result after several scrolls
and visit the page but find out it's not what I want,
I want to go back to the search result and continue.
But after browser back, the result is cleared and
I have to scroll several times again.
Even if I open the result in the different tabs and keep the search result,
it may disappear after browser refresh or restart.
- deleted 3y ago[deleted]
- bunga-bunga 3y ago> it clears scrolling state by browser back 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"
- SilasX 3y agoI wish browsers did this as a default option. The back button should never have a noticeable delay.
- bunga-bunga 3y agoThey do if you use non-ajax navigation: the scroll position is preserved and so is the document as last seen: https://web.dev/bfcache/ https://web.dev/bfcache/ 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.
- noizejoy 3y agoI’ve taken to “open link in new tab” on any search result or listing page for years. It doesn’t solve all the issues, but makes things more tolerable.