title: Set/Delete Cookies on cross subdomain Server Side and JavaScript
body: <p>I have <strong>domain.com</strong>, <strong>sub1.domain.com</strong> and <strong>sub2.domain.com</strong>. From a site of <strong>sub1.domain.com</strong> i call a script to set cookie on <strong>domain.com</strong> like this</p>
  
  <pre><code>document.cookie = "KEY=Value; domain=.domain.com; path=/; expires=Thu, 01 Jan 2013 00:00:01 GMT";
  </code></pre>
  
  <p>I check browser an see that cookie. Look good. After that I go to <strong>sub2.domain.com</strong> to modify or delete the cookie I've created.</p>
  
  <pre><code>document.cookie = "KEY=Deleted; domain=.domain.com; path=/; expires=Thu, 01 Jan 1990 00:00:01 GMT";
  </code></pre>
  
  <p>But no luck, Cookies are still there, value remain. What should I do to remove root cookie from subdomain?</p>
  
  <p>EDIT:</p>
  
  <p>To make it clear: I use citrix single sign on to authenticate on both domain. we just have to login to .domain.com and citric will authenticate the rest. But the problem is it does not have sign out mechaniz so I have decide to clear cookies. It work when i clear it with browser plugins. But when it come to code (javascript) it won't work. Does anyone know this</p>