title: how to set cookie in new window?
body: <p>I want to open new window by using window.open and I want to set new cookie for that new window . 
  I have tried to set cookie by using below code </p>
  
  <pre><code>        window.open("https://mysite.n")
          var expires = (function(days){
                      date = new Date();
                      date.setTime(date.getTime() + (days * 24 * 60 * 60 * 
                     1000));
                   return date.toUTCString();
             })(5);
        document.cookie ="mytestcookie=testcookie; expires="+expires+"; path=/";
  </code></pre>
  
  <p>After this code execution . When I tried to get this cookie in new window I am getting undefined . Please help to set cookie in new window . </p>
  
  <p>Thanks in Advance . </p>