F
Fabrice Labrousse
Hello,
after many deep searches on javascript and cookies, i still cannot have an
answer for a incredible cookie problem !
here it is, i hope you'll be able to answer me :
This is my function that put on a disk a cookie that has a 5 minutes
duration
function pose_5minutescookie()
{
var expdate=new Date();
expdate.setTime(expdate.getTime() + (5 * 60 * 1000));
alert ("expires=" + expdate);
document.cookie = 'test=1; expires=' + expdate.toGMTString() + '; path=/;
domain=eg_domain';
window.history.go(0);
}
the alert says that the expiration date is well calculated
the cookie sets on the drive
BUT
The cookie never expires !!!!!!!!
Another interesting expérience is that if i change the time to less than 500
(ms that's right !) instead of 5 minutes (in the example), the cookie does
not appear on the disk. I think this should mean that its living time is too
short to be written. I admit but if i run this cookie to expire in 1000 ms,
it appears ont the disk but it never expire !
Any idée ? Did anybody ran a 5 minutes cookie ?
Fabrice
after many deep searches on javascript and cookies, i still cannot have an
answer for a incredible cookie problem !
here it is, i hope you'll be able to answer me :
This is my function that put on a disk a cookie that has a 5 minutes
duration
function pose_5minutescookie()
{
var expdate=new Date();
expdate.setTime(expdate.getTime() + (5 * 60 * 1000));
alert ("expires=" + expdate);
document.cookie = 'test=1; expires=' + expdate.toGMTString() + '; path=/;
domain=eg_domain';
window.history.go(0);
}
the alert says that the expiration date is well calculated
the cookie sets on the drive
BUT
The cookie never expires !!!!!!!!
Another interesting expérience is that if i change the time to less than 500
(ms that's right !) instead of 5 minutes (in the example), the cookie does
not appear on the disk. I think this should mean that its living time is too
short to be written. I admit but if i run this cookie to expire in 1000 ms,
it appears ont the disk but it never expire !
Any idée ? Did anybody ran a 5 minutes cookie ?
Fabrice