I have a list of users shown in a paginated fashion and need to determine how to handle these two scenarios:

Scenario 1

  • 41 users, 10 users per page - There will be 5 pages and the 5th page will have a single row.
  • If the user is viewing the 5th page and the 41st user is removed, to which page should you re-direct the user?

Scenario 2

  • 38 users, 10 users per page - There will be 4 pages and the 4th page will have 8 users.
  • User1 is viewing the 3rd page right now.
  • User2 navigates to the 3rd page and removes all 10 rows, so effectively there are 28 rows in total.
  • If User1 tries go to the 4th page, it has become stale.

What is the correct way to handle these situations? Is there expected behavior for situations like this?

2 Answers 2


Regarding the first scenario: It is a good practice to avoid orphaned items; my advice is to stick to 10 users per page and show 11 users at 4th page. Now if you delete all items on 4th page, remove the page number from pagination and take user back to third page.

Regarding the second scenario: It will be best to update the list in real time via AJAX and remove deleted items right away (updating pagination right away); it will help you to avoid additional edge situations (for example the one where User1 will call delete on item which was already deleted by User2).

Now regarding the pagination itself: It is a bad idea to introduce it as a way to navigate through long list of items. You can have 2 scenarios:

First one - the list is short (lets say less than 100 items) which means you can show it as is, maybe with a way to filter and sort it; introducing pagination in this situation will only complicate things for user and bring extra friction into your application.

Second - list is long (200+, 300+, 1000+) which means you are doing something wrong and probably user should not see (and in most cases does not need to see) the entire list. In this case pagination is not a silver bullet either. Also, by avoiding pagination you will avoid situations like the one you are solving; pagination only introduces needles friction for both you (by forcing you to think of stupid edge situations) and your users.

Here is more reading if you are interested in spending time thinking about pagination: http://www.codinghorror.com/blog/2012/03/the-end-of-pagination.html http://www.slate.com/articles/technology/technology/2012/10/website_pagination_stories_should_load_into_a_single_page_every_time_.html


It depends on how you are dealing with the recently emptied pages. Do you show it as an empty page for a short duration before removing it altogether? Or, do you immediately give a 404 error?

Scenario 1:

You should be redirected to the 4th page since you deleted the last only entry on the 'last page' and you should be redirected to the new last page.

You can argue that you can reload the 5th page as empty ("no content on this page") and once the user navigates away from it, the 5th page cannot be accessed again.

Scenario 2:

When user2 deletes the 10 rows in the 3rd page, the 4th page essentially becomes the 3rd page. When user1 clicks on page 4 he should get content no longer available and reload the same page to update the content. Now, you can try to explain the situation here 'Content on page 3 has been deleted and the content on page 4 has been moved to page 3' if your design needs it.

If you are using ajax to handle the content, then remove the link to page 4 as soon as the user2 deletes page 3 and show a notification to the user that the content he is seeing right now has been removed or something.

  • 1
    In Scenario 2, you say the content on page 4 is no longer available. But, all it has done is move to page 3, as in Scenario 1. So wouldn't it be better, and more consistent, to just redirect the user to the last available page? This is what Google does (since they estimate the number of pages).
    – Brendon
    Apr 30, 2013 at 6:42
  • 1
    @Brendon thanks for pointing that out. How does scenario 2 look now?
    – rk.
    Apr 30, 2013 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.