Skip to content Skip to sidebar Skip to footer

Client-side Vs. Server-side Scripts To Process Order

I am designing a website to allow the user to pick the size of their pizza and the toppings they put on it. Based on these choices, I want to write scripts to: 1. calculate the co

Solution 1:

It is probably best to do a little of both. If you do it client-side, the user will be able to alter the values using inline javascript, which is a security vulnerability. Javascript validation is much faster and more convenient than server-side validation. Best practice is do both.

Solution 2:

Client side is optional, it can save you doing round trips to the web server every time you want something done. Server side is not, well not unless you already have a free meal deal for hackers.

Post a Comment for "Client-side Vs. Server-side Scripts To Process Order"