Hacker News new | ask | show | jobs
by dang 6 days ago
Good idea but #61 will often be the #60 you were just looking at.
4 comments

Oh I see the challenge. So because the ranking could’ve changed, there’s a chance anything on the current page could’ve slipped to the following page. So with my naive algorithm, you could even end up with the replacement for 60 matching the user’s stale 59. In that case I’d go one step further and say whatever is 61 or higher currently that isn’t shown on the user’s stale page. If they refresh or navigate the expectation is rankings could change so it seems like a reasonable compromise. Though I really don’t have strong opinions here and trust y’all to get it right.
You could try cursor based pagination?
This is true on the first page too.
id say just dont load anything easiest and least error prone.