Here's the scenario:
I'm showing to the user (let's call him UserA) 10 items per page, ordering them by date (newest first).
As UserA still viewing page 1, another user (let's call him UserB) posts a new item.
Then, UserA decided to click on page 2. Now UserA is surprised to see the last item that appeared in page 1 is showing again as the first item in page 2.
How to solve this problem? (I think there are different approaches to solve this problem).
To clarify, this is my query:
select * from items order by publish_date desc limit <(PAGE_NUMBER - 1) * 10>, 10
To Note: "Infinite-scrolling" is not a solution, because behind the scenes infinite-scrolling is simply pagination where next page is requested automatically.
Alternative Scenario:
I'm showing to the user (let's call him UserA) 10 items per page, ordering them by date (newest first).
As UserA still viewing page 1, another user (let's call him UserB) deletes an item (let's suppose the deleted item is the last item in page 1).
Then, UserA decided to click on page 2. Now UserA sees 10 items of page 2, but he doesn't know that the last item of page 1 is different now (because it was deleted, so the first item of page 2 is now showing as the last item in page 1). So UserA misses viewing 1 item.