With regards to security and convenience which cookies are better the PHP ones or the JavaScript ones?
With regards to security and convenience which cookies are better the PHP ones or
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They are the same ones, in both cases the cookie is sent to the browser, stored there and the browser send it back to you every request until it expires or is deleted.
For that reason, you should never use cookies for security as your question implies nor for any data which you consider important to keep unaltered by the end user.
There are five things to always remember when you use cookie:
If you get that, accessing cookie from PHP or JavaScript is simply a question of what’s more convenient to you.