84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我的应用是由node和express搭建的,执行下面代码,其中 xxxxx 是 httpOnly 的,结果是:uname 删除了,xxxxx没有被删除。所以,不能删除 httpOnly 的 Cookie?
res.clearCookie('uname'); res.clearCookie('xxxxx');
业精于勤,荒于嬉;行成于思,毁于随。
Add your path, for example
res.clearCookie('xxxxx', { path: '/' });
If that doesn’t work, set the expiration time to -1
res.cookie('xxxxx', '', { expires: -1, path: '/' });
httponly js cannot be read or deleted
I haven’t tried this, but it seems that after setting httpOnly, the cookie content cannot be read by using document.cookie in the browser console.
Add your path, for example
If that doesn’t work, set the expiration time to -1
httponly js cannot be read or deleted
I haven’t tried this, but it seems that after setting httpOnly, the cookie content cannot be read by using document.cookie in the browser console.