E
E
Extramezz2015-11-04 14:43:39
JavaScript
Extramezz, 2015-11-04 14:43:39

Get cookie options?

Good afternoon.
Write cookies through document.cookie , I know that. But look, I write:

document.cookie = "something=1;path=/;expires=Tue, 19 Jan 2038 03:14:07 GMT";

Now alert(document.cookie);. And what do I see?
something=1, all? How can I find out the parameters of an existing cookie? For example, path and expires ?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
sanex3339, 2015-11-04
@sanex3339

No way

S
Scribblex, 2015-11-04
@Scribblex

parse with a regex?)

I
Ivanq, 2015-11-04
@Ivanq

document.cookie = "something=1";
document.cookie = "path=/";
document.cookie = "expires=Tue, 19 Jan 2038 03:14:07 GMT";

D
Dmitry, 2015-11-04
@mytmid

Reading document.cookie

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question