How to avoid loosing work by saving an older copy still open in the browser.

104 views
Skip to first unread message

Jan

unread,
Sep 2, 2020, 8:49:21 AM9/2/20
to TiddlyWiki
Hello,
it happend again. Because I have to work on different computers I loose
sometimes work by saving form an versions still stored in a Browser on
the other computer.
The problem occurs using store.php .
This problem even grows bigger if someone uses the browserstorage-plugin.
In most cases I can retrieve the work from the backup-folder (I am sure
not all users can do that.) but this time it was lost bcause I realized
the loss some days later :-/ .

My love to TW is stable, but for new users this can be anoying.
Are there any ideas how to avoid this?

Jan

talha131

unread,
Sep 2, 2020, 11:15:42 AM9/2/20
to TiddlyWiki

You can fix this issue if you make sure your copy of TW is available on all your computers.

You can either use an online hosted version or host TW locally on your LAN, like using NodeJS or Caddy.

Mark S.

unread,
Sep 2, 2020, 2:31:27 PM9/2/20
to TiddlyWiki
I think if you're using store.php the best bet is to follow good TW hygiene. Always close your tab after working, and when starting to work with an open tab after being away from your machine or device, refresh. If it blocks you from refreshing, then check if you have anything that needs to be saved and export it as necessary.

Another strategy is have separate TW files for each device. Then drag and drop tiddlers that have changed between TW files. 

Jan

unread,
Sep 2, 2020, 3:54:23 PM9/2/20
to tiddl...@googlegroups.com
Hi and thank,
this is what I know I should always do. But I am human and want a machine-solution against forgetting to do this...

cheers Jan
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2c4a2619-3919-4881-be33-e21ec7ad0735o%40googlegroups.com.

Birthe C

unread,
Sep 2, 2020, 4:05:49 PM9/2/20
to TiddlyWiki
For a long time I had the text refresh browser in red above story, to get into the habit.

You are right though we will forget at times and the feeling....GRRRRR

Birthe

Eric Shulman

unread,
Sep 2, 2020, 4:36:37 PM9/2/20
to TiddlyWiki
On Wednesday, September 2, 2020 at 12:54:23 PM UTC-7, Jan wrote:
this is what I know I should always do. But I am human and want a machine-solution against forgetting to do this...

In theory, you could modify the store.php script so that when sending the current TW contents to store.php, you also send the document.lastModified value.  Then, store.php could compare that value against the date of the hosted version of the file to ensure that the date on the server is not more recent than the date sent from the currently loaded document.  If it is more recent, it could reject the save and return an error.  Then, to resolve the problem, you would export the changed tiddlers from the TW in the browser (saving the export file locally), and then reload from the server, and then import the changes to merge them.  Then save to the server again.

I say "in theory" because I don't have access to the version of store.php that you are using, and I also don't have a server on which to test the changes.

Some possible issues:
* the document.lastModified value is only valid if you loaded the document via http or https protocol.  If you are working from a local file copy, that value will be the current date/time, regardless of when the file was actually saved.
* WebKit returns the time string in UTC; Gecko and Internet Explorer return a time in the local timezone.  Thus, you might have to install the "Browser Sniff" plugin (from the TW Official Plugin Library) in order to detect which browser is in use, and then do some conversion to match the time in use on the server (which might also be either UTC or local time)


-e

Jan

unread,
Sep 3, 2020, 8:29:44 AM9/3/20
to tiddl...@googlegroups.com
Hi Eric,...
Aahh, these two issues make the question even more komplex. especially the timestring issue... I guess I will keep this in mind untill I have an Idea.
Thanks for explaining this to me.
Jan
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages