javascript - 带有 `document.cookie` 与 `cookieStore.get` 的 Cookie 属性
问题描述
如果我使用 设置具有某些属性的 cookie,如果我使用 cookie而不是使用document.cookie
访问 cookie,则会向我报告它们:cookieStore.get
document.cookie
document.cookie = ">>>Test123=Hello there; Secure; SameSite=Lax";
console.log(document.cookie);
cookieStore.get(">>>Test123").then(console.log);
document.cookie
给出:
>>>Test123=Hello there
cookieStore.get
给出:
{
domain:null,
expires:null,
name:">>>Test123",
path:"/834420",
sameSite:"lax",
secure:true,
value:"Hello there"
}
有没有办法在SameSite
不使用的情况下获取例如 cookie 的属性的信息cookieStore
?
我在这里有代码:https ://playcode.io/834420/如果有帮助
解决方案
推荐阅读
- matlab - 用不同的颜色图在一个图中绘制两个等值面对象
- vba - 在 vba 和 access 上使用记录集,我如何复制最后一条记录并更改它的字段
- react-native - 反应原生 AwesomeAlert customView 抛出错误
- database - 节省磁盘空间是否仍然被认为是规范化的优势?
- erlang - 如何迭代多个相同类型的 GenServer?
- ios - Firebase iOS 推送通知在首次安装时不起作用
- python - 从python中的字符串中删除数字
- android - 使用带有 android 的 sheet api 添加一行
- java - TelephonyManager getstate() 在 android 中返回零
- python - python 正则表达式试图匹配字符串中第二次出现的一组单词