Session cookies = cookies?

前端 未结 4 719
栀梦
栀梦 2021-02-05 21:28

I wonder if cookies are the same as session cookies?

4条回答
  •  情深已故
    2021-02-05 22:05

    A cookie is a cookie.

    "Session cookie" can refer to one of two things:

    • A cookie with unspecified timeout, which will be discarded as soon as the browser is closed. I.e. the browser will only retain it for the current "browsing session."
    • A cookie containing a session id.

    Sometimes it means both. It's not a very well defined term.

    As such, the correct description would be session cookie ⊆ cookie,
    instead of session cookie = cookie. ;o)

提交回复
热议问题