Recap: the other way
In the previous post we built offset pagination (?page=2). The server runs LIMIT 10 OFFSET 10. Simple, but it has two pains:
Deep pages are slow. OFFSET 1000000 makes the database walk and throw away a million rows.
New rows shift the pages. If someone inserts a row while you scroll, page 2 might repeat a row from page 1...
🛡️ VERIFIED CYBER INTELLIGENCE ID: #3476534