I am requesting data from a web service with page number & limit. For example, I start with page number 1 & limit as 10. Each time when I request, I increment the page number with the same limit. The limit can be set to anything… Here, the client decides the size of the page & number of pages. Is this the right approach?
When the requested page is not available, the service returns the last page.
Should the server be the one who decides the page size & number of pages? Need suggestions @leob
And also how to display “You reached the end… No more items available”. Whether the service should return me the status “You reached the end” or the client has to determine it by comparing it with previous response?
My doubt is "Who has to be the master for pagination? Service or client? "