1

I'm receiving from server such cookie:

SID=vDAqgF4KMKFvZmc1t6NevC7WgLe1cKssufK2OdwwSKKdK9ptkBDS2TNKeMYp472e; expires=Sun, 31 Jan 2100 22:00:00 GMT; Path=/; Domain=localhost; HttpOnly

I cannot set it into document.cookie.

I've tried different ways to fix it, like replacing localhost on 127.0.0.1 or removing HttpOnly flag, but it didn't help.

Bogdan Gishka
  • 254
  • 1
  • 12
  • take a look here: http://stackoverflow.com/questions/1134290/cookies-on-localhost-with-explicit-domain - in this answer a User says that in `localhost `you must use `""` or `null` like `Domain`... - so in your server side app/script try to omit the `domain` information. – Frogmouth May 16 '15 at 10:49
  • Unfortunately it didn't help. `Domain=false`, `Domain=null`, `Domain=''` or `Domain=` - none of this variants worked for me. – Bogdan Gishka May 16 '15 at 11:00
  • have you try to omit `domain`? `SID=vDAqgF4KMKFvZmc1t6NevC7WgLe1cKssufK2OdwwSKKdK9ptkBDS2TNKeMYp472e; expires=Sun, 31 Jan 2100 22:00:00 GMT; path=/; HttpOnly` – Frogmouth May 16 '15 at 11:09
  • Yes, I've tried it and got the same result. :( – Bogdan Gishka May 16 '15 at 11:18
  • The cookie is set by a server? The server has the same origini that the page where you check the cookie. (all localhost?) – Frogmouth May 16 '15 at 11:44

0 Answers0