Cookie value isn't being saved, its expiration date shows 1970 January 1st, 3:00:12

Practice




Cookie value not being saved, its expiration date is 1970 January 1st 3 hours 0 minutes 12 seconds

are you saving it from java or php?

I'm saving cookies from PHP

check the path the cookie is being saved to - either it matches the current url or is set to be available across all pages of the domain "/"

checked - set for all paths of the domain

also check the value of the variable being saved, maybe you're saving an empty cookie)))

yes, indeed I tried to save an empty cookie, and its expiration date was in the past))) apparently the browser set that kind of date

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)