Answer the question
In order to leave comments, you need to log in
Why are cookies different on different pages of the same site?
There is a site. Cookies are created in one file:
setcookie('login', 'login', time() + (31 * 24 * 60 * 60), "/");
setcookie('rights', 'user', time() + (31 * 24 * 60 * 60), "/");
setcookie('login', 'login', time() - (31 * 24 * 60 * 60), "/");
setcookie('rights', 'user', time() - (31 * 24 * 60 * 60), "/");
Answer the question
In order to leave comments, you need to log in
To delete a cookie, you need to specify the one path
that was during installation.
For example, if you set a cookie with path = /user/auth
then you will not be able to delete them by specifying path = /
. At the same time, the browser can store any number of cookies with the same name but different values path
. The same is true for cookies that are set with the domain name.
There is a site. Cookies are created in one file:
path = /
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question