Data loss after sleep wakeup

Post Reply
capocasa
Jr. Bludit
Posts: 2
Joined: Thu Oct 15, 2020 1:55 pm

Hi!

I've been having a bit of a data loss issue where I click save, the text I wrote was not saved, but the windows was still closed. This caused a bit swearing.

I think what's happening is that after waking my computer up, login session may no longer be valid, and save fails. However, this happens silently. Then, when I go back to open up my document, it's just not there.

I have too proposed solutions:

(1) Do not close unless absolutely sure that data was saved, by some kind of special confirmation code (perhaps a cache could deliver a 200 even though data was not saved, just as an example) and then do not close window unless saved

(2) Use localstorage as a backup client-side autosave- for starters, it would be enough just to be able to go through recent changes and perhaps find your text to copy and paste, nothing really fancy required there- just store the data in an extra place as a failsafe. This should probably be done all the time rather than just upon clicking save.

Preferably both. Bludit is so nice because it's so relaxing to type in, but of course potential data loss has a way of making you nervous.

Existing autosaves seem to silently fail as well in this condition- this should at least display a warning. So, in summary, it would appear that saving is insufficiently robust.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Two solutions for the problem:

1) Use the plugin Heartbeat:

https://plugins.bludit.com/plugin/heartbeat

2) Use an addon for your browser like Form History Control (II) for Firefox.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
capocasa
Jr. Bludit
Posts: 2
Joined: Thu Oct 15, 2020 1:55 pm

Thank you for your reply! Will do both.

I would like to point out that I think avoiding data loss during edge case conditions would make a great candidate for a core feature.

Edit: The best way to do it I am aware of is to both alert when saving does not work and autosave on keypress debounced by 3-5 seconds. (quietly autosave after 3-5 seconds of not typing- "debounce" can be found as a feature in JS libs).
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

capocasa wrote: Sun Oct 18, 2020 9:15 pm I would like to point out that I think avoiding data loss during edge case conditions would make a great candidate for a core feature.
You can post this as feature request on the GitHub tracker of Bludit:

https://github.com/bludit/bludit/issues
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply