[thelist] javascript cookies and persistence

David J. Burger davidjburger at yahoo.com
Mon Oct 30 16:13:28 CST 2000


Recently I started working with Javascript for the
first time.  I am having trouble getting cookie
persistence between browser sessions.  As long as the
browser is not closed, my save feature, which is
implemented with cookies, works fine.  If the browser
is closed and then the user goes back to the web site,
the load no longer functions.  If you would like to
look at my code you can go to the page I am talking
about at:

http://webpages.hsa-kauai.net/dburger/java/randomizer/javascript.html

Or, you can look at the relevant code here:

var theCookie =
"webpages.hsa-kauai.net/dburger=listItems:" + theItems
+ ";path=/;expires=";
//you would think the date needs to be escaped but the
WebMonkey
//example didn't have it that way
window.document.cookie= escape(theCookie) +
theDate.toGMTString() + ";";

__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/




More information about the thelist mailing list