jQuery vs. PHP - Performance Comparison

后端 未结 8 811
猫巷女王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 06:51

    The correct answer is always - Test/Benchmark it. That way you know for sure which is better.

    That said, if you are doing a basic comparison of PHP (A server-side language) to jQuery (A client-side language) the server-side one should be faster. However it will always depend on what logic you are trying to process.

提交回复
热议问题