B
Brett
I'd like to set a session cookie that expires once the browser is
closed. I've tried:
document.cookie = "wm_javascript=" + escape("SomeName|" +
window.document.referrer);
with no expires. This doesn't set a cookie. It seems I must put in
an expiration for the cookie to set. The code below does work:
var the_name = window.document.referrer;
var the_cookie = "wm_javascript=" + escape("SomeName|" + the_name);
var the_date = new Date("December 31, 2050");
var the_cookie_date = the_date.toGMTString();
the_cookie = the_cookie + ";expires=" + the_date.toGMTString();
document.cookie = the_cookie;
Why doesn't the session cookie set? I'm using IE6.
Also, if a user has multiple IE windows open, will the session cookie
expires only after all IE windows have closed?
Thanks,
Brett
closed. I've tried:
document.cookie = "wm_javascript=" + escape("SomeName|" +
window.document.referrer);
with no expires. This doesn't set a cookie. It seems I must put in
an expiration for the cookie to set. The code below does work:
var the_name = window.document.referrer;
var the_cookie = "wm_javascript=" + escape("SomeName|" + the_name);
var the_date = new Date("December 31, 2050");
var the_cookie_date = the_date.toGMTString();
the_cookie = the_cookie + ";expires=" + the_date.toGMTString();
document.cookie = the_cookie;
Why doesn't the session cookie set? I'm using IE6.
Also, if a user has multiple IE windows open, will the session cookie
expires only after all IE windows have closed?
Thanks,
Brett