Pick the fix
New posts arrive at the top while the user scrolls, and offset pagination shows duplicates. Fix?
Hint 1 of 1
What changes when items are added at the top?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Cursor-based pagination: request items after the last item's cursor
Correct. Insertions at the top don't shift the next page.
Why not the others?
- B Use a larger page size. Duplicates still appear when items shift.
- C Reload the whole feed on each page. It's expensive and loses scroll position.
- D Remove duplicates by text. Two posts can have the same text; use ids, and fix the cause.