@Mark_S Seems like the js file is also accessible at this url: https://tiddlyhost.com/tiddlywikicore-5.2.3.js
So no need to specify the wiki name
@Mark_S Seems like the js file is also accessible at this url: https://tiddlyhost.com/tiddlywikicore-5.2.3.js
So no need to specify the wiki name
The question is whether that is an accident or on purpose.
Iâve just pushed an update that is suposed to automatically give everyone the shared https://tiddlyhost.com/tiddlywikicore-5.2.3.js .
(I might switch to https://tiddlyhost.com/tiddlywikicore-5.2.3.min.js soon, which is a little smaller.)
@simon With uglify itâs possible to reduce the size of the core to 1,197MB (vs 2MB for tiddlywikicore-5.2.3.min.js)
https://github.com/Telumire/TW/raw/main/tiddlywikicore-5.2.3-uglified.js
Maybe an iframe could be a solution, see Easy way to fix mastodon verification issue (for wiki over 1MB)
Just a follow-up to confirm that it will indeed work on tiddloid with a local library. You need to write the full path to the library. e.g.
/storage/emulated/0/share/tiddlywikicore-5.2.3.js
I can see where it would be handy to have a switch mechanism so you could reset the library location depending where you were using it.
Interesting idea @Mark_S
An Offline switch?
I find this whole thread fascinating!
As an idiot I could benefit from a simpler run-through of âŚ
The advantages of splitting-out the core / + plugins to ⌠(where?)
How easy would it be, in practice, for an average bear?
IF it improves performance on start-up Iâd be likely very happy.
BUT, I slightly have some qualms that core on its lonesome could be a problem, sometimes?
Just queries from a naive end-user
Best, TT
Separating the core and plugins from a wiki is useful in these scenarios :
The browser is able to cache external javascript, so the loading time is improved, and a smaller file is also faster to save.
The external JavaScript configuration is useful in certain circumstances, hence its inclusion in the core. But I strongly believe that it is far from a universal solution, and that TiddlyWiki should not present it as a mainstream option.
The problem is that the concept of dependencies between files is difficult for many end users, despite it being a commonplace idea for developers. In fact, itâs not uncommon for web users to only have a hazy notion of files and directories.
For most users, moving from a single file configuration to a pair of dependent files opens the door to a range of fairly horrific bad outcomes when things go wrong with version mismatches and dangling dependencies. Thatâs bearable for sophisticated users, but itâs not something that we should expect of TiddlyWikiâs mainstream users.
The usability will always be problematic â for example, see the instructions for upgrading a single file wiki with external JS. Even if we smooth out those processes, thereâs still a fundamental complexity introduced by shifting so much of a burden to users having to ensure that they keep track of the right tiddlywiki.js files.
As it happens, if we were going to promote a dual file solution for TiddlyWiki Iâd be more interested in structuring it differently: a generic âtiddlywiki.htmlâ viewer application that loads/saves from external âtiddlers.jsonâ files. I think thatâs closer to a conventional mental model of how applications work, and is more conducive to being packaged as an installable Chrome app etc.
Just to be clear, I am not saying that people shouldnât use the externalised JavaScript configuration. Far from it, I think we learn a lot from these experiments. And of course it is entirely appropriate for online services like Tiddlyhost or Xememex to use it, where it should be entirely invisible to end users.
It would make sharing / doing backups of specific tiddlers much easier, but is that possible to do without additional software? If so then wont tiddlydesktop become obsolete ?
With the File System Access API you wouldnât need additional software, though browser support isnât universal. I have playing around with something similar on WebDAV.
I work a fair bit with users in bandwidth scarce regions where the savings in size would be very beneficial. However, in practice I have found that the usability drop is considerable when moving from a single file to two files that both need to be present, saved and shared etc and easily outweigh the bandwidth savings. Granted, these are also users with limited digital literacy.
There are no average bears. But, if you donât understand the instructions or implications at the top of the wiki here, then Externalising your core probably isnât for you. Which is alright. Or bearable.
Splitting out the core means rapid fire saves. Especially on hosted services, I always wait for a save to complete before continuing to work. It should also mean faster loads after the first load. At least on desktop chromium, the library file is cached in memory. Which means that reloads are faster. But the cache will be emptied when the browser is shut down. How long it is kept in the cache is entirely up to the browser. If the cache works the same way on a phone, then you should be pulling far less data.
And if you have it set up on your phone to use a local library file, then thatâs 2mb of data that doesnât have to be transferred. Local data is going to be much faster than pulling data over a phone/internet connection.
A service like TiddlyHost could save oodles of space using an external core. And there would be somewhat less bandwidth used since presumably most people are using browsers that will cache the core at least for awhile.
The main downside is that it is probably too complicated for people that donât understand file dependencies and/or file paths. So, for instance, if you download your externalised TW from TiddlyHost and then turn off your internet connection, your TW file wonât work (unless of course you have a properly downloaded and pathed local library file.)
While Iâm cheering with @TiddlyTweeter from the bear hut at a distance, Iâm curious if this technique would allow for a âTW administratorâ to present a certain âcentral setupâ of a TW, including content, that end users can then locally modify? A use case would be an organization with a central information wiki, e.g policy docs, but where end users can also locally add and manipulate their own content? Maybe admin can even continuously add new stuff (e.g âTodays lunch menu!â) to be accessed upon reload?
Could I even filter what such, um, âpure content wikisâ should fetch⌠like "The core and all tiddlers tagged âPublicâ?
âŚand could I use Tiddlyhost as the CDN for my admin wiki and then give empty âcontent wikisâ to my friends or colleagues that, upon load, fetch the core and my stuff, and then they can add their own stuff locally?
Not sure who Iâm asking here⌠except for the TH matter which of course is for @simon
I think there is massive value in what this offers and I agree with the risks raised, there may be good ways to minimise the potential issues. A âhalf way houseâ.
I agree, For both @jeremyruston and @Mark_S above, moving from a single file configuration to a pair of dependent files can just be left to advanced user or host.
We could discourage its use for regular users, to avoid these unnecessary complications, however perhaps the best approach would be to build in the control panel some easy to read information and tools along with some trouble shooting tools for when the host delivers wikis this way.
Yes, by using the plugin by cdruan. Demo : Libro â A custom tiddlywiki edition
You can also add plugins internally and they should work.
EDIT: after testing, the internal plugins canât be from an external plugin library, so you will either need to prepare a js files with all the plugins you need, or install them from another library (CPL library for example).
I love the work by @telumire and @cdruan here! This solution allows me to be able to create a light and rather speedy website including several single file Tiddlywiki (comparing to my old solution of having a 4Mb html per wiki).
So as @jeremyruston explained above, I think average users and developer can benefit from this solution while it may not a good option for other.
Some real examples (suggestion):
As common with TW â User content always wins. So plugins added by the user will be initialized later and therefore will win.
As I wrote ⌠The whole thing is a standard TiddlyWiki. NO extra plugin is needed to install any 3rd party plugin. They still work. You only loose the size advantage. 3rd-party plugins will add size to the html file.
If you want to add 3rd party plugins to the externalized-plugin youâll need a plugin.
EDIT: after testing, the internal plugins canât be from an external plugin library, so you will either need to prepare a js files with all the plugins you need, or install them from another library (CPL library for example).
You can import any 3rd party plugin from any 3rd party library and add it to externalized-plugins with the plugin from cdruan. I did just test it.
You can also add 3rd party plugins to a setup with an externalized-core, externalized-plugins and have internal-plugins. ⌠As usual those internal plugins add size to the html-file.
BUT
As this post points out and as Jeremy mentioned. The increased flexibility comes with a cost. Extra management complexity.
As I wrote ⌠The whole thing is a standard TiddlyWiki. NO extra plugin is needed to install any 3rd party plugin. They still work. You only loose the size advantage. 3rd-party plugins will add size to the html file.
I understood the question as âis it possible to externalize the plugins in a non-core jsâ, but I realize that I missread that !