Pagination: Server Side or Client Side?

前端 未结 9 2037
生来不讨喜
生来不讨喜 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:11

    One other thing to point out here is that very rarely will you be limited to simply paging through a raw dataset.

    You might have to search for certain terms in one or more columns you are displaying, and then say sort on a few columns and then give the users the ability to page through this filtered dataset.

    In a situation like this you might have to see whether it would be better to have this logic search and/or sort client side or server side.

    Another thing to consider is that Amazon's cloud search api gives you some very powerful searching abilities and obviously you'll want to allow cloud search to handle searching and sorting for you if you happen to have your data hosted there.

提交回复
热议问题