本文介紹了過期時間為“會話結(jié)束時"的 cookie 何時過期?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
有一個帶有過期時間的會話 cookie,上面寫著在會話結(jié)束時".它到底什么時候到期或者它會永遠活著?
There is a session cookie with expiration time which says 'At end of session'. When exactly does it expire or will it be alive forever?
推薦答案
當(dāng)你使用setcookie
時,你可以將過期時間設(shè)置為0
或者干脆省略參數(shù)- cookie 將在會話結(jié)束時過期(即,當(dāng)您關(guān)閉瀏覽器時).
When you use setcookie
, you can either set the expiration time to 0
or simply omit the parameter - the cookie will then expire at the end of session (ie, when you close the browser).
這篇關(guān)于過期時間為“會話結(jié)束時"的 cookie 何時過期?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!