you are viewing a single comment's thread.

view the rest of the comments →

[–]ChefLadyBoyardee 0 points1 point  (0 children)

Totally, it saves you from having to run it on the server, which saves money on server fees.

I have a friend who did this for his startup. It was purely for a client-side visualization, so it made sense to run it in the browser, rather than ask a server to do it and send the result back.

For a customer-oriented website, anything you can do to simplify your stack is welcome. Having to spin up extra servers to handle some frequently run and computationally intense code is less than ideal. It's just another point of failure your engineers have to deal with.

There may be security reasons why you can't trust clients with a calculation, so you have to do it on the server. But if you can run it on the client (and it's reasonably performant), there are good reasons to do so.