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
Why won't Exchange Transport service start in Exchange 2007 on our SBS 2008 server ?
VMware ESXi4 Backup
How to use Outlook VBA to select messages in an Outlook folder and run VBA macro
Symantec Endpoint Protection - SID 23615 HTTPS Tidserv Request 2 Detected
Deploy application using GPO win 2008 R2
Cisco 2950 Vlan for Voice
Opera Version 10.60 page cache(!?) problem
Could Linkserver provide me DB schema?
Crystal Reports Xi - Sorting a CrossTab Report by a Summary Field
How Do I run a specific fix and test in ISINTEG