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
Setting Compatibility Mode in IE8 using JavaScript
Need help with 'System.Web.UI.ScriptManag
er is not defined error
Raid 1 Hard drive failed PowerEdge 1850
Filemaker Pro Basic Formatting Email Text
How do I modify this php script to send a confirmation?
Migration of SQL Server 2008 database to oracle
VBScript - Capture Folder Contents Into Array
How do I assign a default value in TextBox fields in DetailsView for Insert mode
Reset HMC on P5 520
SAP RFC returning Invalid Data Type