Discuss Scratch

Zydrolic
Scratcher
1000+ posts

Tell user when their scratchsessionid is 1 day or so from expiry

People don't really know that the cookies page exists, as not a lot of people these days bother to check the footer or even care about reading long pages at this point unfortunately, even if you'd just have to scroll down once to see that the expiry date of sessionid is every 2 weeks.

Even then not a lot of people know how to check the expiry date of a cookie (on Firefox, Inspect Element - > Storage -> Cookies -> scratchsessionid -> “Expiry / max lifetime:”)

I think that having a banner or modal showing up could clear up some confusion rather than people thinking it's a bug.

Sidenotes
I'm horribly bad at JS and similar, but as I recall you cannot access the lifetime of a cookie, unless you'd make another or store it in that same cookie.

Last edited by Zydrolic (Feb. 22, 2025 12:58:31)

NotK3ndricAltAgain
Scratcher
100+ posts

Tell user when their scratchsessionid is 1 day or so from expiry

How are you supposed to know that? I mean, it’s not like your browser stores the information, but how is Scratch gonna say that? Some sort of magic? How would it just detect it magically? Plus, you can just log back into your account, it’s that simple.

TL;DR: How?
Zydrolic
Scratcher
1000+ posts

Tell user when their scratchsessionid is 1 day or so from expiry

NotK3ndricAltAgain wrote:

How are you supposed to know that? I mean, it’s not like your browser stores the information, but how is Scratch gonna say that? Some sort of magic? How would it just detect it magically? Plus, you can just log back into your account, it’s that simple.

TL;DR: How?
Sidenotes
I'm horribly bad at JS and similar, but as I recall you cannot access the lifetime of a cookie, unless you'd make another or store it in that same cookie.
You can read the cookie with document.cookie

Also, yes, your browser does store it (see OP's second paragraph), cookies are killed/removed on expiry date locally, however you cannot access the expiry date [in JS, HTML, etc] unless you store it in a different cookie or in the same one, which I'd mentioned.
As for adding the banner (or, alternatively, a modal - Whatever would float their boat if they add this), you could just copy the code for the “Privacy policy updated” banner's displaying.

Last edited by Zydrolic (Feb. 22, 2025 14:10:25)

Powered by DjangoBB