Skip to content

About the two different save methods

Simon Baird edited this page May 19, 2023 · 4 revisions

There are two methods of saving TiddlyWikis supported by Tiddlyhost, "upload save" and "put save".

Upload saving

Also known as "TiddlySpot Saver" in the control panel, this saving method originates from the UploadPlugin created by BidiX for TiddlyWiki Classic many years ago. It was built into TiddlyWiki5 with backwards compatibility with UploadPlugin. You can see the relevant code here.

It's likely that Tiddlyhost will always support upload saving since it's the only method TiddlyWiki Classic can use. But for the latest version of TiddlyWiki5 (starting with 5.2.3) upload saving is now considered deprecated in favor of put saving, and Tiddlyhost will use put saving by default for TiddlyWiki 5.2.3 and higher.

Put saving

Put saving is a simpler and more modern saving technique based on the WebDAV protocol. You can see the code for the put saver here.

Apart from being less clunky that the upload save, there is a key feature that put save supports that is not possible with upload save. The put saver can detect newer changes on the server and refuse to overwrite them. When using put save, if the site was changed since you loaded it, say for example it was modified and saved on another device or in another browser tab, the later save will fail and you'll see a message such as the following:

File changed on server

The site has been updated since you first loaded it. Saving now would cause those
updates to be overwritten.

Try reloading and then reapplying your changes.

This is still not a great user experience - it would be better if Tiddlyhost could somehow merge or combine the new changes with the old changes - but for now this is considered preferrable to silently overwriting the older changes and losing whatever those changes might have been, which is what would happen with the upload saver.

Overriding the default save method

If, for some reason, you need to force a particular save method to be used, you can do that using the check boxes under "Advanced options" in a site's setting page. You can use those options to override the defaults and force newer TiddlyWikis to use the upload saver, and older TiddlyWikis to use the put saver.

Note that the error messages will be less verbose when using the put saver for TiddlyWiki versions older than 5.2.3 [1]. For example you might see just File changed on server without the additional explanation shown in the example above. Apart from that it should work fine and it will still prevent you from overwriting newer changes. The lack of the longer explanation message is the reason I don't want to make put saving the default for all TiddlyWiki5 sites, but you can opt in if you wish.

Note also that Tiddly spot sites will continue to only support upload saving. Put saving is only for Tiddlyhost.




[1] #5638 and #6589 are related to the error handling for put saves.