← Quiz: API Design: all 15 questions
Quiz: API Design · Question 4 of 15
Why is cursor pagination better than offset pagination for an infinite-scroll feed?
Why is cursor pagination better than offset pagination for an infinite-scroll feed?
- A.It lets users jump straight to page 500
- B.New items do not shift the pages, and the database can seek directly using an index
- C.It needs no index at all
- D.It always returns more items per page
Answer & explanation
Correct answer: New items do not shift the pages, and the database can seek directly using an index
The cursor says "older than the last item I saw", which stays correct when new posts arrive.
Can you get the rest right without peeking?
Take the timed Quiz: API Design quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →