I would like to know which of the two methods that I am going to explain next are more optimal for the Client Side
to implement the pagination of search results:
1- Bring todos los elementos
that throws the search in a JSON, present only a part and as it changes the page I'm showing different elements from the JSON that I already have.
or
2- Bring only los primeros N elementos
in a JSON and as the page changes request the server via AJAX the corresponding elements.