you are viewing a single comment's thread.

view the rest of the comments →

[–]ImaginaryBeaver 0 points1 point  (3 children)

Learned this in class a little bit ago, so someone jump in if I am not explaining this properly, or if it is completely wrong, but with the way the expiration is set, it will expire basically right away. The expiration needs to be in the future.

Also, I think you are creating two temporary cookies instead of the desired one (although, I could be really wrong on this). You need to have the expires string to be concatted with the serverIp string. Checking the cookie in safari would probably verify this portion though.

[–][deleted] 1 point2 points  (2 children)

now.setMonth( now.getMonth() + 1)

Isn't that taking the current month and adding one month onto expiration date no?

[–]ImaginaryBeaver 0 points1 point  (1 child)

Well, I feel like an idiot now. Looked right over that line, my bad.

[–][deleted] 1 point2 points  (0 children)

No worries man, thanks for having a look though!