Friday, 9 June 2017

javascript - Setting multiply cookies

I have following code



var formatedData = JSON.parse(outParams["Result"]);

var clientData = JSON.parse(outParams["ClientGuids"]);

Cookies.remove("client");
Cookies.remove("result");

Cookies.set("result", JSON.stringify(formatedData));
Cookies.set("client", JSON.stringify(clientData));

var obj = Cookies.get("result");
var o = Cookies.get("client");



I get the value of a "client", but there is no "result" cookie. I'm using https://github.com/js-cookie/js-cookie lib. Am I missing something?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...