API Design · Middle · Question 13 of 75

Why does offset pagination produce duplicates or gaps when items are inserted while paging?

Explanation

Cursor pagination based on a stable sort key (e.g. createdAt, id) doesn't have this problem.

Further reading

Problem with a question

API Design · Middle · question 13

Test yourself

Take the API Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz