• far_university1990@feddit.de
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    6 months ago

    https://developer.chrome.com/blog/cookie-max-age-expires/

    This change does not impact session cookies—cookies that do not explicitly set an expiration date with Max-Age or Expires—as these are instead cleared when the browsing session ends.

    Sound like either set by server in header or it session cookie.

    Not found for firefox yet, maybe the same.

    Edit: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies

    Permanent cookies are deleted after the date specified in the Expires attribute: or after the period specified in the Max-Age attribute:

    Session cookies — cookies without a Max-age or Expires attribute – are deleted when the current session ends. The browser defines when the “current session” ends, and some browsers use session restoring when restarting. This can cause session cookies to last indefinitely.

    Sound like firefox the same.

  • mox@lemmy.sdf.org
    link
    fedilink
    arrow-up
    5
    ·
    6 months ago

    Unless something has recently changed in the standards, there is no such thing as a default cookie lifetime. If a web site creates a cookie without defining the expiration time, it is to be kept until the end of the session (i.e. when the user closes the browser).

    Note that browser extensions exist that can delete cookies early under certain conditions, such as when they are from a tab that hasn’t been used for an extended period of time.

    • Detective'@slrpnk.netOP
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      6 months ago

      Ok good to know, it does seem like there is some standard across browsers for a maximum cookie lifetime of 400 at least.

      Do you have a cookie extension in specifc you would recommend?

  • whoareu
    link
    fedilink
    arrow-up
    1
    ·
    6 months ago

    wait, does the lifetime of cookie is decided by browser? I thought it is handled by the server and the server decided when to expire certain cookie.