Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Cookies can be applied on <strong>domains</strong> and <strong>subdomains</strong>.</p> <p>If you do not set the domain cookie attribute, by default, the cookie domain will be the full host name used., So actually a user targeting <code>http://www.example.com</code> gets a cookie with domain www.example.com, and after redirection on <code>example.com</code> this cookie is not valid anymore.</p> <p>But if the cookie sent by your application, on both example.com or www.example.com contains:</p> <pre><code># Watchout there is a dot in front of the domain # required for old browsers to match subdomains domain=.example.com; </code></pre> <p>Then this cookie would be valid for both <code>http://example.com</code> and <code>http://www.example.com</code> (and in fact for any subdomin also). The client would manage it automatically, without any complex stuff in apache configuration.</p> <p>Instead the stuff is in the <strong>application responsible for the visitor_id cookie generation</strong>, if it's a PHP application this is defined by default in the in the <a href="http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-domain" rel="nofollow">cookie_domain</a> setting, but it can also be enforced on <a href="http://php.net/manual/en/function.session-set-cookie-params.php" rel="nofollow">session_set_cookie_params</a> function usage. Of course such settings are also available for Java EE or .Net applications, in all web application you can have some control on the cookie domains.</p> <p>This could be used for a simple SSO mechanism or to track visitors between subdomains like in your case, and it's a very robust solution.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload