Cannot set cookies in Javascript

后端 未结 9 2199
青春惊慌失措
青春惊慌失措 2020-12-01 10:28

I have a very simple line of code that set and read a cookie. I kept getting empty value for my cookie and have no understanding why. I have cookie enabled and know that coo

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 10:54

    Recently I stumbled upon a similar issue. My script couldn't store a cookie in Chromium, although it worked well on all other major browsers. After some googling it turned out that Chrome ignores cookies from local pages. After I uploaded the page to remote server code magically started to work.

提交回复
热议问题