I've been doing some experiments to explore how TiddlyWiki might be able to use standards-compliant browser techniques to accomplish file saving.
The motivation is that we're already seeing browsers (finally) tightening up some of the security loopholes that have historically allowed TiddlyWiki to function. Establishing a standards-compliant way of operating, even if it's a bit clunky, would go a long way to give us all confidence that TiddlyWiki can continue to function properly in the long term. The first approach I've been looking at is that of assembling the new TiddlyWiki file as a data: URI, and then simulating clicking on a link to it in order to force the browser to download it. You can see the code here put together into a simple demo of a sort of plain text single tiddler TiddlyWiki. https://github.com/Jermolene/FileSavingDemo On Chrome, the experience isn't entirely terrible: one just edits away, clicking 'save' every so often. Then, after the editing session, one retrieves the most recently downloaded file from the 'downloads' folder. On other browsers, it's a bit worse - both Safari and Firefix give no control over the name of the downloaded file, so it doesn't even have an '.html' extension. I'm imagining a future version of TiddlyWiki that adds a technique like this as a fallback for when the browser hacks don't work. This approach does actually have a couple of nice features: notably, that it is possible to save the file locally even if the page has been loaded over http. So, one could imagine a service like http:///getmytiddlywiki.com/ that presents itself as a sort of tear-off pad: you'd make your initial edits while at that URI, and then click 'save' to download a local copy of your changes. I'm interested to know what people think about this approach, and of course any suggestions or help with figuring out how to improve it on different browsers, Best wishes Jeremy -- Jeremy Ruston mailto:[email protected] http://www.tiddlywiki.com -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywikidev?hl=en.
