title: Google Chrome Cookies - HTTP & HTTPS
body: <p>I have a site that uses www.example.com for standard pages and secure.example.com for HTTPS.
  I am trying to set a cookie when user logs in that will be valid on both the HTTP &amp; HTTPS versions of the site.</p>
  
  <p>I am doing this by setting path to "/" and domain to ".example.com". This works fine in Firefox and Internet Explorer, but in Chrome the cookie is only working on the version of the site where it was set (<a href="http://www.example.com" rel="noreferrer">http://www.example.com</a> or <a href="https://secure.example.com" rel="noreferrer">https://secure.example.com</a>)</p>
  
  <p>Is this a bug or am I doing something wrong? If it's a bug is there a workaround?</p>
  
  <p>The cookie is being set by PHP in headers.</p>
  
  <pre><code>setcookie("login",base64_encode($email."::".md5($password)),2840184012,"/",".example.com");
  </code></pre>