🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.It lets users jump straight to page 500
  2. B.New items do not shift the pages, and the database can seek directly using an index
  3. C.It needs no index at all
  4. 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 →