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
Seeking tool for scaling, resizing, and cropping uploaded images (javascript / php, etc)
DOS Batch Turnkey system for Win95
Simulate clicking into a textbox
msoutlook 2007 data file do not compress
Modify Excel VBA to include a range of cells
WordPress - header and footer navigation has suddenly dissappeared
MySQL data need to "replace" CRLF
How to reset PHP Session Handler to default
Installing SSL cert on Exchange 2007
Sysprepping Windows 7 PCs