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
HTTP Error 404.3 on IIS 7.0
OCS 2007 R2 and Cisco call manager
Mapping a network drive in VB.NET or accessing a protected network path
Combine worksheets from different workbooks into one workbook using VB.Net
auto shutdown laptop when main power is off
Initialization failed for opening on premisis exchange server
How to stablish a proper setup in MS Outlook 2003 encrypting mails
Sonicwall VPN with SBS 2008 Radius
User profile service in Sharepoint 2010
bulk collect - amount of return