开发者

Set first party cookie in PHP

开发者 https://www.devze.com 2022-12-30 12:23 出处:网络
How can we se开发者_C百科t a first party and third party cookie in phpYou can set a cookie using setcookie()

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消