Pagination bugs live at the edges: the last page with three items instead of ten, the empty result set, the page number past the end. Set a total that does not divide evenly by the page size and every one of those cases appears.
What you can control
- Four pagination styles covering the conventions in common use.
- Page counts, offsets and navigation links are computed from the total, so the last page really is short.
- The empty-page toggle produces the zero-result state that most list UIs never got designed for.
- The Link header style follows RFC 8288 with
first,prev,nextandlastrelations.
What this is not
Cursors are base64-encoded index strings. Real cursor pagination uses an opaque token encoding sort position, so use these for client testing rather than server design.
Questions
Which pagination style should I use?
Cursor pagination for anything where rows are inserted while a user is paging — offset pagination silently skips and repeats records when the underlying list shifts.
Why test the empty state?
Because a list component almost always ships without one, and the first customer with no data sees a blank rectangle instead of an explanation.
What is RFC 8288?
The specification for the HTTP Link header. It carries pagination in headers rather than in the body, which keeps the response payload to just the data.