safenotes icon indicating copy to clipboard operation
safenotes copied to clipboard

clear sessionstorage after first load

Open whysthatso opened this issue 4 years ago • 6 comments

Is your feature request related to a problem? Please describe. when reloading the same tab, the information is still present, probably related to the payload value in the sessionstorage?

Describe the solution you'd like when reloading the tab, the message should be gone, and a notification should show that the message has been indeed deleted remotely and locally

Describe alternatives you've considered i thought closing the tab would get rid of it, but when reopening the last closed tab, i could again enter the passphrase and see the message.

Additional context i think it would make sense to nuke the place, really, in order to make sure there is no uncertainty on the user side that there might be any trace of the message.

whysthatso avatar Jan 25 '21 23:01 whysthatso

Hi, @whysthatso ! Thank you for reporting and sorry for the long delay. Either I missed Github's notification or it simply never sent it :( . Although I agree with you, and that was the idea on first implementation, I got requests of adding this functionality for two reasons: 1) if you entered the password wrong there would be no way to recover from that, and there was a high percentage of people getting bit by this, 2) you could refresh the page by mistake and then loose the info, I got stung by this myself a few times. I implemented this using the session storage, so once the browsing session is done the data should be erased by the browser. If you have a suggestion of a better implementation I am open to hearing it. Or maybe a contribution? ;) I am thinking of maybe making this configurable, so if someone wants to disable this functionality they could?

rendler-denis avatar Jan 30 '21 10:01 rendler-denis

heya, no worries.

i fully understand the tradeoffs you had to choose between.

i'd love to help, but my browser api knowledge and necessary programming skills are utterly lacking.

as an idea, i would just communicate that in a more straight forward way, so as not to confuse a user that would expect otherwise. maybe during creation for the secret creator and after revelation for the secret reader just mention the exact conditions under which the note will get deleted. ("this message will be available as long as the browser is open, it will be destroyed once the browser is closed. if you reload this tab, you might still see the message." or something along these lines)

also, making this configurable sounds perfect. i'd like to use that "fragile level", as i gladly resend a message, but would really want it to disappear asap.

whysthatso avatar Feb 01 '21 15:02 whysthatso

also, did i already thank you for your work and making this stuff public? i don't think so, so here you go:

thank you!

whysthatso avatar Feb 01 '21 15:02 whysthatso

Hi, @whysthatso ! Thanks for the nice words :) . I did not expect it 🙇

Would you be willing to add a feature request for making this configurable and I will see how fast I have some spare time to make it happen.

rendler-denis avatar Feb 01 '21 15:02 rendler-denis

here you go: #42 let me know if any clarifications are necessary.

whysthatso avatar Feb 01 '21 16:02 whysthatso

hehe, 42

whysthatso avatar Feb 01 '21 16:02 whysthatso