I am seeing that more and more new APIs use page tokens to let the user move between the pages of results containing a lot of items. However from an API designer point of view I'm not clear on what the benefits of using a token are when compared to letting the user specify how many items he wants to skip.
So here are my questions :
- What are the benefits of using a page token over a start index ?
- Roughly, in high-level terms, how does the typical page token implementation keeps track of pages ? Caching all the results would be rather inefficient. I'm guessing that some sort of hash could be used, but I'm not sure what would be hashed to reconstruct the results.