Microsoft
Software
Hardware
Network
Question : Setting javascript cookies properly
I am setting a cookie like so:
document.cookie = 'name=value';
The problem I am having is that after I close the browser, the cookie gets deleted.
How can I set the cookie so that it stays "permenantly"
Answer : Setting javascript cookies properly
just simply put the expiry date to a bigger value, something like
function setCookie(name, value)
{
var expirydate = (new Date(2200, 1, 1)).toGMTString();
document.cookie = name + "=" + escape(value) + "; expires=" + expirydate ;
}
Random Solutions
Count/sum items between dates
Help with PHP statement
Show gridlines in visio diagram saved as jpg file.
Size of integer in embedded
Asterisk 1.4 assigning outbound routes based on extension
is there a way to boot to an attached drive
Does Crystal Reports 11.5 run on Windows 7 64 bit
Data insert wizard php/mysql
return double array in Delphi call to c++
New ESXi 4 Host (not responding) in vCenter