why change recent URLs to use number instead of date?

Just leaving some notes:

  • The term is “keyset pagination”.
  • Many articles suggest that this is “pagination done right” and offset based pagination should be avoided (I tend to agree).
  • In its pure implementation keyset pagination has no notion of page numbers.
  • Depending on the sort order a composite offset may be required.
  • A quick search suggests that page numbers can be reintroduced with the help of window functions (PostgreSQL >= 8.4, MySQL >= 8.0, MariaDB >= 10.2).

Edit: This could actually allow for a type of pagination that takes the sweet spot between page numbers and facets. E.g. if your sort order can be clustered into some meaningful represenation, this r. can be used to convey the distribution of the result set (mind you, these are drafts):

  • Sort by date (aka age):
    [Latest] [Feb '19] [Jan '19] [Newer] (May 6th 2018) [Older] [Oct 16] [Mar 16] [First]
    
    [Latest] [1 week] [3 weeks] [Newer] (3 weeks) [Older] [13 weeks] [24 weeks] [First]
    
  • Sort by name:
    [First] [az] [gr] [Prev] (la) [Next] [ob] [ob] [Last]
    
  • Sort by relevance score:
    [Best] [7.3] [5.4] [Prev] (5.2) [Next] [2.1] [0.3] [Worst]
    
2 Likes