Pagination: Server Side or Client Side?

前端 未结 9 2036
生来不讨喜
生来不讨喜 2020-11-29 18:39

What is it best to handle pagination? Server side or doing it dynamically using javascript?

I\'m working on a project which is heavy on the ajax and pulling in data

9条回答
  •  臣服心动
    2020-11-29 19:26

    Do you mean that your JavaScript has all the data in memory, and shows one page a time? Or that it downloads each page from the server as it's needed, using AJAX?

    If it's the latter, you also may need to think about sorting. If you sort using JavaScript, you'll only be able to sort one page at a time, which doesn't make much sense. So your sorting should be done on the server.

提交回复
热议问题