PDA

View Full Version : longer cookies



DisturbedRoach
09-10-2004, 04:15 PM
I really like this script http://dynamicdrive.com/dynamicindex1/navigate2.htm

however, I can't seem to find a script that uses cookies for a long period of time, instead of just for sessions.

Is there any way someone could help me on this and make the script use longer cookies for so many days.

cr3ative
09-10-2004, 08:16 PM
Please do NOT double post; rules are rules.

Your answer:

just add
; expires=Thu, 01-Jan-05 00:00:01 GMT

to the end of the line reading
document.cookie=window.location.pathname+"="+selectedItem

making this:
document.cookie=window.location.pathname+"="+selectedItem; expires=Thu, 01-Jan-05 00:00:01 GMT

info found at http://www.netspade.com/articles/javascript/cookies.xml, which also details other cookie features.

cr3ative

DisturbedRoach
09-10-2004, 10:28 PM
thanx for help...but that does not seem to work

btw...I figured it was the wrong forum to post in....hence the 2 posts