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
checking login & pass with curl
Variable not defined error using VBA ExportAsFixedFormat Type:=xlTypePDF in excel 2003
Server Error: The signature on the certificate was found to be invalid. Check the log file for details.
effects of too many temp tables
Displaying GroupWise contacts in Exchange address book?
Customize left_col.phtml properly in Magento - XML beginner!
Word VBA - how to populate table column from custom 'formula'
Replace line from keyword
Network card disables on reboot
CISCO - ACCESS - DISTRIBUTION - CORE - DO I NEED THEM ALL