[tw5] LocalStorage and TiddlyWiki: toe-dip into exploring possibilities

Just my first toe-dip into figuring out how browser “Local Storage” works.

Not sure I’d trust this for longterm/safe storage of anything, but I am intrigued by the possibilities. TiddlyWiki “proper”.

  • My primary driver is looking for a way to simulate writing to and reading from files in BASIC Anywhere Machine; now I wonder …

  • A way for multiple single-file TiddlyWiki’s to communicate with each other?

    • For example:
      • my lean “quick-note-taking” TiddlyWiki throws the notes into LocalStorage
      • my heavy “labour-intensive-note-making” TiddlyWiki automagically gathers everything from LocalStorage for me when I sit down for the hardwork
      • So the items in LocalStorage are my content but also my TODO’s, and I can delete each item in LocalStorage as I process it.
        Download the attached and drag into any TiddlyWiki for import. There are two tiddlers:
  • LocalStorage HTML

    • this is a complete HTML document with all of the necessary javascript embedded
  • LocalStorage iframe

    • just an iframe with a srcdoc attribute that gets set to the content of LocalStorage HTML
      The first time LocalStorage iframe gets rendered/opened, a popup will ask you for your username. (Put whatever in there.)

The next time LocalStorage iframe gets rendered/opened, it nabs the username from local storage and shows the value.

My first thought: hmmm, I can drag these two tiddlers into any TiddlyWiki instance out there and see right away if it is using local storage (convenient alternative to digging into browser “developer tools”.

LocalStorageLearning.json (1.24 KB)

It’s not intended to be a “longterm/safe” storage, because it’s very easy to accidentally be deleted by the user. It’s also deleted in unpredictable ways by the browser, depending on the available disk space. …

While disks are huge in our days … It still is completely unpredictable and localStorage behaviour may change according to the users privacy settings and browser “private browsing” modes.

-mario

cj.v...@gmail.com wrote: Not sure I’d trust this for longterm/safe storage of anything, but I am intrigued by the possibilities.

Quick comment on how I have used it. I think it is robust enough for, for instance, garnering responses immediately. But I would not trust it between sessions. It is also browser specific. So, yes, additive utility, for clearly defined scenarios. But, no, for a persistent system.

Just a comment
TT

Yeah, I almost wrote “never for longterm/safe storage”, but I like to leave myself some wiggle room in case there are any kinds of improvements I’m not aware of. Not something I’ve ever had time to keep up with.

Well, security-wise, I’m a “no way no how” for certain bits/kinds of data. Keeping an eye out for anything that could change my mind, but I’m crusty curmudgeon about it.

All kinds of useful articles on the web for reading. Loads of hits with a “browser local storage use cases” search.

I’m interested in the standard uses cases and how they could be used with TiddlyWiki, but way more interested in the not-so-much-thought-of possibilities.

In the realm of standard use cases:

  • a public TiddlyWiki hosted on some site, and using browser local storage to save a user’s preferences for using that TiddlyWiki (themes etc.), searches, default tiddlers on startup, yadda yadda
    • same kind of thing with nodejs TiddlyWiki instances on some server
      On the unorthodox side, not sure yet. Definitely the thought of a communication mechanism for TiddlyWiki instances in the same domain.

Hmmm, communication mechanism between a TiddlyWiki instance and something else in the same domain. A way for a suite of favourite tools to interface with each other.

Yup, I may look like the hamster is dead, but the wheels are spinning …

I have used Joplin enough that I am comfortable with its Offline & Synch capabilities. Some points that appeal to me:

  1. Its Open Source and extensively used.
  2. It has reasonable support for Tags and Folders and flexible SORTing.
  3. The Documentation is more than adequate to get you well started.
  4. You can Share ( with trusted Pals )
  5. On Apple IOs its speech recognition is excellent.
    1. better than on Android,
    2. good enough that I can WalkAndTalk
  6. It has Mermaid Markup support and a webClipper capability

ItsNoTiddlyWiki, but IsA good adjunct to TW @ https://joplinapp.org/

I neglected to stress that I intended my my Joplin comments to be “on thread” since it can auto-sync as frequently as every 5 minutes. That would limit any loss of date to a relatively short time frame.