Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 general document.cookie questions...

Status
Not open for further replies.

karnaf

Programmer
Nov 16, 2002
41
IL
Just 2 general Qs...

1. Does a session-only cookie (document.cookie) have to have an 'expires' field?
2. What happens if I call the SetCookie() twice with the same info? will the second call overwrite the first or will I have two cookies?
(for example - 1st cookie: "MyC=1; ratio=0.5;" 2nd cookie: "MyC=2; ratio=0.3" - what will happen when I will enter the second cookie and what will happen when I will try to get "MyC" cookie value?)

thanx!!!
 
1 - no
2 - it overwrites

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top