Why would setting [removed] not work in Chrome?

前端 未结 4 1054
逝去的感伤
逝去的感伤 2020-12-06 10:29

My coworker ran into an issue where NO cookie could be set on Chrome via code like this:

document.cookie = \"TEST=1; expires=Tue, 14 Oct 2014 20:23:32 GMT; pat

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-06 10:54

    The expiry date set for the cookie might be the problem. I have come into a problem like this before on Chrome. Set the date to present or future date and test if it would work. Probably that was how Chrome was designed.

提交回复
热议问题