jQuery vs. PHP - Performance Comparison

后端 未结 8 788
猫巷女王i
猫巷女王i 2021-01-15 06:37

Performance-wise, which would be the better solution? Here\'s a really small example. The PHP script returns a number to jQuery, which needs to be checked if it\'s 1

8条回答
  •  天命终不由人
    2021-01-15 07:01

    That would be dependent on your server hardware, but I guess for the overall performance of your site it's better to do such "decorations" on the client side.

    edit: Plus you have less data to submit to the client.

提交回复
热议问题