On Wed, 20 Jul 2016, at 05:07 PM, Robert Stepanek wrote: > In contrast, a nextPageToken might help server implementations to > reduce search space and speed up response time without keeping state. > A nice write-up for this method is here: > http://use-the-index-luke.com/no-offset The reason we have position+limit (and the total is always returned) is so that a client can simulate having the whole mailbox loaded, without actually having to load the whole mailbox. If the user grabs the scrollbar they can jump to an arbitrary point, and the client can intelligently load in just the data in that page. This can only work using a position. This is simply not possible with the token style paging. Now, you could implement it as well as the position so the client could use either, but frankly that just makes the protocol more complicated without enhancing what you can do with it so I'm not really in favour. > Note that the getMessageList method already defines two different > pagination types (position and anchors) whereas contacts and > calendarEvents only support offset-based pagination. This is there to support a very specific use case: finding the index of a particular item in the list. This lets you restore state from a URL or other serialisation mechanism. It's there because it provides significant extra functionality. Maybe it should be on the other types as well for consistency, although this then adds complexity (I think it's less likely to be useful in the other contexts – contacts will often be loaded in their entirety so the client can find the index, and calendars normally save the date you're looking at as the state rather than an event; the need to expand recurrences client-side anyway makes the index in the list less useful in general). Neil.
-- You received this message because you are subscribed to the Google Groups "JMAP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jmap-discuss/1469000624.3395137.671417881.404D19C6%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.
