How cookies are shared between different domain names
Title
------Solution--------------------
Cookies for different domain names cannot be shared.
But you said if the first-level domain name is the same situation, it is possible. Set the cookie path to. Top-level domain
------Solution--------------------
discuss
Reference:
Cookies for different domain names cannot be shared.
But you said if the first-level domain name is the same situation, it is possible. Set the cookie path to. Top-level domain
I said is completely different, some sites have done, do not know how to do
------Solution--------------------
What is the scenario that some websites do, perhaps not the use of shared cookies?
discuss
Reference:
Cookies for different domain names cannot be shared.
But you said if the first-level domain name is the same situation, it is possible. Set the cookie path to. Top-level domain
I said is completely different, some sites have done, do not know how to do
------Solution--------------------
Suppose there is a domain name www.a.net, www.b.net
cookie.php files are available under each domain name
PHP Code
Header (' p3p:cp= ' CURa ADMa DEVa Psao psdo our BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR "'); if (isset ' token ']) { setcookie (' name ', $_get[' token '). ' ' . $_server[' Http_host '); echo "document.write ('
JS Cookie: ' +document.cookie+ '
');";} else {print_r ($_cookie); $url = $_server[' http_host '] = = ' www.a.net '? ' Www.b.net ': ' Www.a.net '; echo ""; echo "Test";}