When do my wiki edits get saved to the local file system?

178 views
Skip to first unread message

David Furcy

unread,
Feb 9, 2020, 8:44:55 AM2/9/20
to TiddlyWiki
I just realized that my tiddler creations/edits get saved to my GitHub repo more
often than they get saved to my local file system.

Does TW5 normally save the edits ONLY in browser-specific local storage?

If so, when is the local .html file actually updated?

In fact, When I close my browser tab, my changes are NOT changed in the local 
.html file.

I am using Chrome. Also, once in a while I see a 409 error. 

David

Mark S.

unread,
Feb 9, 2020, 10:16:14 AM2/9/20
to TiddlyWiki
Which save mechanism are you using in your local system? If you're using the default saver
(i.e., haven't installed any extensions, etc.) then your file will be stored in your download
directory. Going from memory here, since I don't use Chrome. In Chrome, unless you've
set it to ask each time, it will save to a file like "tiddlywiki (1).html", "tiddlywiki (2).html".

There are more than 20 solutions for saving in TW. Which one is best for you will depend
on your usage.

If you have automatic saving set, then it should attempt to save every time you save a
tiddler. If you don't have automatic saving set, then you have to click on the red
checkmark to initiate saving.

AFAIK, TW will never save when you close it's tab. However, if there are changes that
need to be saved, there should be a popup message like "Are you sure you want to leave this tab?"
that will help remind you to save first.

David Furcy

unread,
Feb 9, 2020, 10:42:38 AM2/9/20
to TiddlyWiki
In the control panel, under Saving > General > Autosave:
I have "save changes automatically" checked.
This seems to work, since every time I save a tiddler, it makes a new
commit to my GitHub repo.

However, I do not have any TW5 files saved in my Chrome downloads 
folder. Note that I also checked:
"Permit automatic saving for the download saver" under
Saving > Download Saver > Enable Autosave for Download Saver
But that does not seem to be doing anything. Or at least I cannot find 
any locally saved files.

In short, I am not sure how to answer your question:

Which save mechanism are you using in your local system?

Thanks in advance for your help!

David

PMario

unread,
Feb 9, 2020, 11:47:24 AM2/9/20
to TiddlyWiki
On Sunday, February 9, 2020 at 2:44:55 PM UTC+1, David Furcy wrote:
I just realized that my tiddler creations/edits get saved to my GitHub repo more
often than they get saved to my local file system.

Does TW5 normally save the edits ONLY in browser-specific local storage?

TiddlyWiki doesn't use browser local storage out of the box. There is a plugin, which needs to be activated, if you want to do so.

I did make some tests after responding to your first post. (BTW: duplicating threads isn't best practice!)

You should be able to use the "Browser-based local storage" plugin. See more info below

If so, when is the local .html file actually updated?

-- In your case never!
 
In fact, When I close my browser tab, my changes are NOT changed in the local 
.html file.

That's intended, with the setup you use.
 
I am using Chrome. Also, once in a while I see a 409 error. 

IMO that's a problem with github, or github pages. ... If you save the whole wiki several times within a view seconds.

The save process (depending on your internet connection speed) may need several seconds to upload the content. If you start it 2 or more times, the github server may be confused and returns 409 response error 

AND more important. If the index.html file is commited it can take several minutes (depending on how busy github is) till the gh-pages are updated.

So save and immediate reload will probably download an _old_ wiki!!!!

-----------

How to install the local storage plugin:

 - Open the ControlPanel : Plugins tab
 - Click [Get more plugins] button
 - Click [Open plugin library]
 - Search for "local"
 - "Browser-based local storage" is the one you want
 - Save to github
   - Wait a little bit
 - Reload the wiki (Shift F9) - and make sure, that it's the one with the plugin.
 - Save again!!! This is important, otherwise the local-storage sync isn't active on reload
 
Afterwards do some testing, if the local storage is really synced. ... I managed to screw up the mechanism, and I think I found an issue  BUT more testing is needed.

have fun!
mario

PMario

unread,
Feb 9, 2020, 11:53:04 AM2/9/20
to TiddlyWiki
On Sunday, February 9, 2020 at 4:42:38 PM UTC+1, David Furcy wrote:
...
However, I do not have any TW5 files saved in my Chrome downloads 
folder. Note that I also checked:
"Permit automatic saving for the download saver" under
Saving > Download Saver > Enable Autosave for Download Saver
 
But that does not seem to be doing anything.

The first save, that can handle the save will do it. At the moment "build in" savers can't be "stacked".
So this setting is ignored, if github saver succeeds.

There is some discussion on github, which I can't find atm.

-m

David Furcy

unread,
Feb 9, 2020, 11:56:45 AM2/9/20
to TiddlyWiki
OK. That makes sense now.

David

David Furcy

unread,
Feb 9, 2020, 12:22:06 PM2/9/20
to TiddlyWiki
Thank you. That is very helpful!

David

PS:

duplicating threads isn't best practice!

OK; but I had two threads because these are two different questions.
This one is about local storage.
The other one (which is still unresolved but I am OK giving up on it)
was about scheduling remote, automatic backups to GitHub at regular intervals.

TonyM

unread,
Feb 9, 2020, 7:26:31 PM2/9/20
to TiddlyWiki
Folks,

It would seem to me a solution to meet the original requirement would be a timer that after 15 mins of inactivity saved to github only if their were unsaved changes.

Personally I am having trouble getting my github saver to work, any good doco anyone can point to?

Regards
Tony

Mark S.

unread,
Feb 9, 2020, 7:30:42 PM2/9/20
to TiddlyWiki


On Sunday, February 9, 2020 at 4:26:31 PM UTC-8, TonyM wrote:
Personally I am having trouble getting my github saver to work, any good doco anyone can point to?

Was it working before and it stopped working, or are you just setting it up now?

TonyM

unread,
Feb 9, 2020, 7:54:35 PM2/9/20
to TiddlyWiki
Mark,

Setting it up now, after trying before.


At the URL https://anthonymuscio.github.io/ I configure all the settings below and hit the save icon
I do not seem to get any responce

The saver settings just tried now are;
Username: AnthonyMuscio 
Target repository: AnthonyMuscio/AnthonyMuscio.github.io
Target branch for saving: master
Path to target file: /
Filename of target file: index.html
Server API URL: 
New Access token, properties attached

Any help would be appreciated

Tony
2020-02-10_11-48-38.jpg

TonyM

unread,
Feb 9, 2020, 7:56:44 PM2/9/20
to TiddlyWiki
Never mind, It made a liar out of me and worked this time.

Thanks anyway

Regards
Tony

Mark S.

unread,
Feb 9, 2020, 8:10:48 PM2/9/20
to TiddlyWiki


On Sunday, February 9, 2020 at 4:56:44 PM UTC-8, TonyM wrote:
Never mind, It made a liar out of me and worked this time.

 
They love to do that.

Mohammad

unread,
Feb 10, 2020, 1:07:50 AM2/10/20
to TiddlyWiki
Hi Tony!
 Good move! I hope we could see your interesting projects on GitHub!

--Mohammad

PMario

unread,
Feb 10, 2020, 1:12:47 AM2/10/20
to TiddlyWiki

On Sunday, February 9, 2020 at 6:22:06 PM UTC+1, David Furcy wrote:
PS:

duplicating threads isn't best practice!

OK; but I had two threads because these are two different questions.
This one is about local storage.
 
The other one (which is still unresolved but I am OK giving up on it)

There is no possibility to set a timeout and it's not needed in combination with the browser storage plugin.
 
-m

Mark S.

unread,
Feb 10, 2020, 10:03:22 AM2/10/20
to TiddlyWiki
I'm not sure how the local storage plugin got into the conversation. I think the original question was just about local file saving.

Jeremy has warned us that the local storage plugin is unreliable. Actually, I'm not sure when you would ever use it. Maybe for brief stints when your cloud storage (e.g. github) is down? Or maybe for quick demos when you don't want to complicate things with discussions about saving?

Mat

unread,
Feb 10, 2020, 6:03:30 PM2/10/20
to TiddlyWiki
Mark S. wrote:

Jeremy has warned us that the local storage plugin is unreliable. Actually, I'm not sure when you would ever use it.


As I understand it, it is convenient to never have to manually save anything and things are still directly saved as you left them every time you start your TW. For example, I think @Danielos https://noteself.github.io/ is based on this and he finds it reliable. (In addition he uses an external server to sync all devices against.)

<:-)

Mark S.

unread,
Feb 10, 2020, 7:00:46 PM2/10/20
to TiddlyWiki

Browser local storage is not a panacea for TiddlyWiki:

  • Browsers limit the amount of local storage available to a page, typically to 5 or 10MB
  • Keeping personal data in browser local storage can lead to unexpected privacy violations
  • Browsers reserve the right to without warning delete data stored in local storage at any time
  • Browsers tie local storage to a URL which can lead to problems if you move a wiki to a URL previously occupied by a different wiki

Please use this plugin with caution. There are a number of unresolved issues and open questions.

PMario

unread,
Feb 11, 2020, 3:49:12 AM2/11/20
to TiddlyWiki

On Monday, February 10, 2020 at 4:03:22 PM UTC+1, Mark S. wrote:
I'm not sure how the local storage plugin got into the conversation.

The OP contains:
Does TW5 normally save the edits ONLY in browser-specific local storage?

As I mentioned in my first post. local storage can be used with a plugin. 

I think the original question was just about local file saving.

no. OP says: "I just realized that my tiddler creations/edits get saved to my GitHub repo" .. So the github saver is the main saving mechanism.
 

Jeremy has warned us that the local storage plugin is unreliable.


You are right. I'm not the biggest fan of the local storage plugin, if it is activated by default ... without much more visual clues, what's going on. I think it would be fine if users know, what's going on.
 

Actually, I'm not sure when you would ever use it.


I think David's usecase is a good fit. ...

 - github saver is the main saver
 - local storage is _only_ needed for "disaster recovery"
 - Also see the David's first post where he asks, if there is a 15 min "save timer"
     - We don't have a "save timer" atm, and it would be much less reliable as the local storage plugin
     - local storage has no delay, the save time has more risk for data-loss.

What do I mean with "disaster recovery"

 - TiddlyWiki autosave is switched off, because it causes problems
 - saving to github can be slow, depending on the internet connection
 - There are "unsaved" tiddlers

and now:

 - The browser crashes
 - The user closes the tab and ignores the "unsaved tiddlers" warning.

In these situations the plugin is extremely useful. There should be no data loss at all, if you stay on the same device with the same browser.
 

Maybe for brief stints when your cloud storage (e.g. github) is down?


Not down, but slow connection and autosave is annoying and causing problems, if you change content very fast.
 
have fun!
mario

PMario

unread,
Feb 11, 2020, 4:28:03 AM2/11/20
to TiddlyWiki
On Tuesday, February 11, 2020 at 12:03:30 AM UTC+1, Mat wrote:
As I understand it, it is convenient to never have to manually save anything and things are still directly saved as you left them every time you start your TW. For example, I think @Danielos https://noteself.github.io/ is based on this and he finds it reliable. (In addition he uses an external server to sync all devices against.)

noteself is based on a library which can be found at pouchDB.com. It is based on the browser indexedDB.

indexedDB is a different (younger) browser storage model, that was invented to solve problems with the browser SessionStorage and LocalStorage. Session- and LocalStorage are also known as WebStorage

IndexedDB has improved data handling, but its data is still hidden from the user, inside the browser. There are limits, which are _not_ deterministic, which is the biggest problem.

App developers need some sort of guarantee. Without these guarantees and the browser "eviction strategy" it makes the whole thing a gamble, if you want to store other than temporary data.

-------------

We are still talking about MBytes of temporary data, but depending on the device free space, the browser you use .. nobody can give  guarantees for persistent data.

-mario
Reply all
Reply to author
Forward
0 new messages