How can we se开发者_C百科t a first party and third party cookie in php
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.
精彩评论