I personally tend to put in the browser JS to calculate, but there is no strong reason.
Do not involve security and store this data.
A,b,c and A.B.C are just used to show up on the page.
Reply content:
Word: On the client or server side is primarily
security -related. Because the client's data can be forged.
advantages of placing on the
client :
- Reduce server pressure
- Reduce broadband occupancy (only one value is passed)
Disadvantages:
- Need to verify its validity
Summarize:
If the number is not important, put it on the client side. If important can also be placed on the client, but need to have a validation mechanism, it is recommended to put on the server side. If this is a function of calculating the blood drop when the enemy hits you, it should be put on the server to calculate, otherwise it will be cheated. Of course the client computed it.
Such a function does not need to change the server state, there is no need to go to server computing. Must put the server Ah, the CPU must run until the end of 100% to rent an object home for the new year AH should be put on the client
The first floor is right, it's about security.
Here your code, do not need to be stored in the database, and do not need to read the server resources, itself where the execution of the server data status will not affect
In this case, put on the server side, there is no benefit, can be done on the client side of the client to complete this is not a performance cost problem, but based on this calculation is used to solve what problem. If it is to calculate a sum on the browser side, but do not need to verify or save parameters, results, then why should be placed on the server. Put to the browser JS to calculate, promote webapp and HTML5 development, for human contribution. Ha ha