0

I developed a pagination with all news I have in database, and I did it in homepage of my website.

I would like to know your opinion, if it´s correct to do pagination on homepage, or if it will be better have a link in homepage "See all news", and than have a page with all news with my pagination.

Im asking this, because the way I did pagination in homepage, I´m doing my select of all news, and I'm afraid that may affect the page loading on the homepage.

Do Think it will be better to have a link to a page where all the news with pagination, or is it irrelevant, and its ok leave pagination on the homepage?

1

If you're talking strictly about performance, I am unsure this is the correct StackExchange community. Maybe Stack Overflow?


I you really want to use pagination, change the way you're doing it: if you're going to have 5000 news in your database and you load everything everytime, you can guess the serious performance issues...

  • Only load a limited amount of news, wether it is loaded statically (via SQL on page loading) or dynamically (via AJAX).
  • Keep track of the "position" in the pagination system. It is obvious that you need to know what you loaded in order to know precisely what to load if the user goes to the next or previous page and load no more and no less than what is needed.

There is apparently nothing wrong about only displaying a limited amount of news with a "see all news" button but it just postpone the issue: when the user clicks on the "See all news", how will that new page display all the news? Pagination?

I recommend using dynamic/on-demand loading in order to create an infinite feed, like many social networks (twitter, facebook...) or many news website (e.g. polygon.com).

  • On page request, only load a limited amount of news, let's say 10.
  • As the user scrolls down, load more and display it beneath the previously loaded news.
  • Repeat

Although this is a personnal opinion, I would not use it as an absolute answer to every problem as I find that sometimes pagination makes more sense (search results).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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