getting cookie expiration dates and paths

Y

yawnmoth

To set a cookie, you're supposed to set document.cookie to something
like this:

cookie_name=cookie_value; expires=unixtime; path=/path/

Reading document.cookie back will tell you cookie_name and
cookie_value, but not the unixtime or the path variables that are
associated with a given cookie_name. Is there anything that can be
done to get this information?
 
Y

yawnmoth

Not that I know of, but why would your script need them?

To change their values? Based on the testing that I've done thus far,
it seems to me as though you need to provide the "correct" path to
update a cookie. If you try / when the cookie's actual path is /
whatever/, it doesn't seem to work. At least not with Firefox.

As for the expiration date... I don't really need that. I just
figured I'd ask about it while, at the same time, asking about the
path.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top