I am creating cookies using Javascript as below
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=/";
}
While Firefox and Chrome create a mcoo cookie for 7 days and mdes cookie for SESSION, Internet Explorer creates only the mcoo cookie. What am I missing here?
createCookie('mcoo', hash, 7);
createCookie('mdes', hash);
Update
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.