May 2025
Intermediate to advanced
270 pages
6h 55m
English
Cursor-based pagination (CBP) solves some of the problems with offset and page-based pagination. Let’s look at what CBP is and how it solves the problems present in other kinds of pagination.
The trouble with offset and page-based pagination is that, despite the book analogy, the pages in these methods change. Typically, most APIs return the latest records. This is what you want them to do. A chat that offered you the first thing that you ever wrote and made you go all the way through all your messages to see the latest would be very hard to use. But this means that an object currently at the top of the first page will eventually move to other pages as new records are created. As I said, the pages change
Read now
Unlock full access