this is part of my code:
// cookie functions
function getCookieExpireDate(noDays){
var today = new Date()
var expr = new Date(today.getTime()+31*24*60*60*1000)
return expr.toGMTString()
}
function makeCookie(name, data, noDays){
var cookieStr = name + "="+ data
if (makeCookie.arguments.length > 2){
cookieStr += "; expires=" + getCookieExpireDate(noDays)
}
document.cookie = cookieStr
}
this should set the cookie to exist for a month. but instead it only lasts as long as the browser is open. the cookie is accesed on a separate page. If i close the browser and redirect straight to the page where the cookie is read, there is no data values.
what am i doing wrong?
-Mon3y is the r00t of all evil and every man needs roots-
// cookie functions
function getCookieExpireDate(noDays){
var today = new Date()
var expr = new Date(today.getTime()+31*24*60*60*1000)
return expr.toGMTString()
}
function makeCookie(name, data, noDays){
var cookieStr = name + "="+ data
if (makeCookie.arguments.length > 2){
cookieStr += "; expires=" + getCookieExpireDate(noDays)
}
document.cookie = cookieStr
}
this should set the cookie to exist for a month. but instead it only lasts as long as the browser is open. the cookie is accesed on a separate page. If i close the browser and redirect straight to the page where the cookie is read, there is no data values.
what am i doing wrong?
-Mon3y is the r00t of all evil and every man needs roots-