Setting persistent cookies with javascript

后端 未结 3 1461
广开言路
广开言路 2020-12-05 11:02

I have found a weird bug in my application and due to my small experience with Javascript I couldn\'t debug it;

I am trying to set a persistent cookie, which will d

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-05 11:51

    have you tried using the getFullYear() and setFullYear() methods of the Date instance instead of getYear() and setYear() ? the latter are are deprecated, see here.

    hope that helps! cheers.

提交回复
热议问题