Javascript “了解很少的饼干”;参数";

Javascript “了解很少的饼干”;参数";,javascript,php,cookies,Javascript,Php,Cookies,我不确定下面2个cookie属性(会话&存储ID)。如何分配它们以及如何为它们设置值 { "domain": "localhost", "expirationDate": 1395835493.034348, "hostOnly": true, "httpOnly": true, "name": "token", "path": "/", "secure": false, "session": false, /* What

我不确定下面2个cookie
属性
会话
&
存储ID
)。如何分配它们以及如何为它们设置值

{
    "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"
}
我知道rest
cookie属性
,但不清楚
会话
storeId

有人能解释一下吗


谢谢

我猜您是在使用chrome扩展API打印此信息

cookie的storeid和session属性将由Chrome扩展API决定。Cookie的RFC没有这些

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

发件人:


更新:忽略expires值将使其成为会话cookie

如何将
cookie
设置为会话cookie
?忽略expires值将使其成为会话cookie。