title: Internet Explorer won't let me create session cookie using this Javascript function?
body: <p>I am creating cookies using Javascript as below</p>
  
  <pre><code>function createCookie(name, value, days) {
      if (days) {
          var date = new Date();
          date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
          var expires = "; expires=" + date.toGMTString();
      } else var expires = "";
      document.cookie = name + "=" + value + expires + "; path=/";
  }
  </code></pre>
  
  <p>While Firefox and Chrome create a <strong>mcoo</strong> cookie for 7 days and <strong>mdes</strong> cookie for SESSION, Internet Explorer creates only the <strong>mcoo</strong> cookie. What am I missing here?</p>
  
  <pre><code>    createCookie('mcoo', hash, 7);
      createCookie('mdes', hash);
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>As a workaround I have changed the days * 24 to 6, and changed the expiration day of mcoo to 28 (so this is 1 week) and put an expiration daty to mdes 1 (6 hours). But I want per session.</p>