How to delete a cookie?

后端 未结 8 1672
说谎
说谎 2020-11-22 02:08

Is my function of creating a cookie correct? How do I delete the cookie at the beginning of my program? is there a simple coding?

function createCookie(name,         


        
8条回答
  •  时光取名叫无心
    2020-11-22 02:22

    You can do this by setting the date of expiry to yesterday.

    Setting it to "-1" doesn't work. That marks a cookie as a Sessioncookie.

提交回复
热议问题