【问题标题】:Understanding Few Cookie "Parameter"了解很少的 Cookie“参数”
【发布时间】:2014-03-25 17:50:13
【问题描述】:

我不确定以下 2 个 cookie property (session & storeId)。如何分配它们以及如何为它们设置值。

{
    "domain": "localhost",  
    "expirationDate": 1395835493.034348,
    "hostOnly": true,
    "httpOnly": true,
    "name": "token",
    "path": "/",
    "secure": false,
    "session": false,    /* What does session option mean here & how to assign them. */
    "storeId": "0",      /* What does storeId mean here & how to assign them. */
    "value": "6e5ef234b7f34fd265f011ab80fc0cff"
}

我知道休息 cookie property,但不清楚 sessionstoreId

谁能解释一下。

谢谢

【问题讨论】:

    标签: javascript php cookies


    【解决方案1】:

    我猜你正在使用 chrome 扩展 API 来打印此信息。

    cookie 的 storeid 和 session 属性将归因于 Chrome 扩展 API。 RFC for Cookie 没有这些。

    session - 如果 cookie 是会话 cookie,则为真,而不是具有到期日期的持久性 cookie。
    storeId - 包含此 cookie 的 cookie 存储的 ID,在 getAllCookieStores() 中提供。

    来自: https://developer.chrome.com/extensions/cookies

    更新:忽略过期值将使其成为会话 cookie。 Create a cookie that lasts until the browser is closed(Session Cookie?)

    【讨论】:

    猜你喜欢
    • 2011-01-14
    • 1970-01-01
    • 2012-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-17
    • 1970-01-01
    • 2011-09-30
    • 2012-07-21
    相关资源
    最近更新 更多