Cookies - PHP vs Javascript

前端 未结 6 1100
面向向阳花
面向向阳花 2021-01-01 12:35

With regards to security and convenience which cookies are better the PHP ones or the Javascript ones?

6条回答
  •  -上瘾入骨i
    2021-01-01 13:30

    Well I'm not a security guru, but one thing's for sure. If you set them in JavaScript, since it's front-end, the user will see how you read and write your cookies and what you put in them, which means he has a lead. While doing this in PHP, will not show him how you're reading and writing them and what are you doing with them.

提交回复
热议问题