N
N
NO1nam2020-01-19 02:16:33
JavaScript
NO1nam, 2020-01-19 02:16:33

How to import cookies?

How can I import cookies into the browser if I receive them through the document.cookie command,
I receive them in this format

lastSyncDate=1579399023216; uidc=75e238e040ad0b; PHPSESSID=731e409e40f2e5299c599a32e07bb170.1579388420.0469743

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
wisgest, 2020-01-19
@NO1nam

Each cookie separately

document.cookie = "lastSyncDate=1579399023216";
document.cookie = "uidc=75e238e040ad0b";
//...

After the cookie itself, with a semicolon can be specified additional. parameters (e.g. lifetime) as in the HTTP header Set-Cookie.

G
GrayHorse, 2020-01-19
@GrayHorse

EditThisCookie

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question