5 ms·
I really liked Discourse's approach to infinite scrolling[1], it updates the URL as you go with the History API's replaceState() function so you can safely navi
by _frog 13y ago
I really liked Discourse's approach to infinite scrolling[1], it updates the URL as you go with the History API's replaceState() function so you can safely navigate away from the page without losing your position.
[1]: http://eviltrout.com/2013/02/16/infinite-scrolling-that-works.html http://eviltrout.com/2013/02/16/infinite-scrolling-that-work...
- jonshariat 13y agoIf you look at the URL bar in google's example it does that as well.
- prawks 13y agoThe difference is that Discourse does it on a per-item basis, Google's on a per-page. A small implementation detail.
- navs 13y agoWell with discourse you want to go to a very specific comment in the thread so doing it per item is best. But that's not for every use case.
- Flimm 13y agoThe difference is that it doesn't break the back button! Clicking back takes me back to HN, not back a page.
- yeukhon 13y agoAlso, visually, the up page# down could be shown on the right hand side. [http://try.discourse.org/t/discussion-happens-so-much/127/98 http://try.discourse.org/t/discussion-happens-so-much/127/98] and with a bigger font. that's more clear. putting it in the bottom is hard to read.
- berns 13y agoIt's not without problems though. It breaks the incremental find in chrome. When the URL changes, the find dialog gets closed.
- rplnt 13y agoWouldn't it be better to use anchors? It is the same page after all... now you'll end up with thousands of duplicit entries in your history.