Possible Duplicate:
Sorting on the server or on the client?
As a part of a project for my university, I have to make a website like a forum let's say.
So there will be posts, many of them. Every Post has a like bar, comments, some text, some buttons etc. Also the user will be able to sort these posts that appear in a page, based on some criteria like date,name, popularity etc.
My question is how should I implement the sorting: 1. with javascript on the browser's side, or 2. with a form or something, and a new request to the server (in this way the server has to send me back the posts sorted) ?
Thank you in advance.