My answer is "it depends". What's the size of the data? Is it enough to go to the browser and allow it to store/sort it (usually not).

Do you have enough memory to store it at the web server layer? (Sometimes yes, sometimes no)

Do you have an N tier? An Application Server between the Web Server and the DB that can store it there?

Finally, then look at storing it in the DB. Is the data static or changing? Dynamic data might force you to keep a cursor open (Not good). Static (or near static) and you can pull down the set of rows you need by providing a start/stop/ordering-filtering conditions.