Home > front end >  Why don't delete off cookies
Why don't delete off cookies

Time:09-18

The function clearAllCookie () {
Var keys=document. Cookies. Match (//^=; + (?=\=)/g);
If (keys) {
For (var I=keys. Length; I -;) {
Document. The cookie=keys [I] + '=0; Path=/; Expires="+ new Date (0). ToUTCString ();
Document. The cookie=keys [I] + '=0; Path=/; Domain='+ document. Domain +'; Expires="+ new Date (0). ToUTCString ();
Document. The cookie=keys [I] + '=0; Path=/; Domain=baidu.com (for example); Expires="+ new Date (0). ToUTCString ();

}
Window. The location. Href="https://bbs.csdn.net/yhgl/www/cjgly/admin.html";
}
}

Keys can get name, but the inside of the modified value!

CodePudding user response:

Should be you delete cookies, the corresponding key value is not correct

CodePudding user response:

Can obtain key should be right

CodePudding user response:

https://blog.csdn.net/weixin_40687883/article/details/105834936
  • Related