How can we set a first party and third party cookie in php
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.
You can set a cookie using
setcookie()However, I don’t believe you actually know the difference between 1st and 3rd party cookies.
Whenever you browse to a website, that page can set a cookie. That is called a 1st party cookie. You browsed directly to the page, and now that page gives you a cookie.
However, if the page had some Javascript that pulled in a script from another website, and it tried to set a cookie, the browser would see it as a 3rd part cookie. This is a feature used often by Analytics and Ads that want to track users.
3rd party cookies and 1st party cookies can be disabled individually to protect the user.