You need to sign in to do that
Don't have an account?
TehNrd
What are the params for new Cookie creation?
The documentation for the new cookie class seems to fall a little short. I create a new cookie like this:
Cookie myCookie = new Cookie('counter','1',null,-1,false);
But I can't find any documenation on what these parameters are. Here is my best guess(name,value,?,?,isSecure). I assue one of the ? is some time of duration or expiration date. Are any of these optional?
Can someone enlighten me and perhaps update the documentation.
Thanks,
Jason
You're right, the documentation falls a little short here but the parameters are referenced in the comments section of the example code so I would go with that for now (Name, Value, Path, maxAge, isSecure). I would assume all parameters are required but you can provide "null" for the path to store the cookie at the root.
Thanks, I blew right past that. I assume an age of -1 means it is only good for the session.
You got it...
<0 = session cookie
0 = delete
>0 = valid time in seconds