Here's an answer on Stack Overflow that seems pretty relevant:
In theory, either would be acceptable. In practice, I would lean toward doing as much repetitious work on the server as possible. If you think about it in terms of which can do it faster, you KNOW how fast your server can do it. The resources stay (relatively) constant.
The safest bet is always to use known quantities as much as possible. In this case, the sever is your known quantity - do the work there.
But, here's an answer to a different question with another way to look at it:
For small number of clients, server side code is generally faster. For very large number of clients, offloading work to client side code can greatly improve performance.
But ultimately, I think the following comment on that second question is the most relevant:
It doesn't matter. Performance should be your last concern in web development. Make it secure, functional, reliable and maintainable first.
So it kind of looks like a gut thing (unless, of course, you have actual data suggesting one route over another). If it makes you feel dirty, then change it.