mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-25 23:40:02 +00:00

* putSaver: detect edit conflicts to prevent clobbering, if possible if the server supplies an ETag, we send it back when saving, allowing the server to detect edit conflicts and respond with 412 (cf. https://www.w3.org/1999/04/Editing/) caveats: * this only kicks in after the first save, as we don't have access to the ETag when first loading the document * there's no recovery mechanism (e.g. resetting `this.etag` in order to force clobbering), other than manually reloading the document * putSaver: retrieve ETag upon initialization for clobbering protection this addresses one of the caveats from the previous commit (2d75cb83afe3dd8cecf1faef43c7a9c9b7324bfb) - while theoretically prone to a race condition, it seems unlikely that saving will be triggered before the server responds * putSaver: simplify URI extraction this simplifies the approach introduced in f51f6bf774d7acf3304f516e2ff0af4f4e05fff1, with the purpose of removing the fragment identifier * putSaver: localize error message * putSaver: switch to built-in HTTP helper in the process, fixed ETag assignment in `#save` method (was `this.etag`, now `self.etag`) as well as a syntax error due to a missing closing brace * putSaver: consolidate URI handling
title: $:/core/readme This plugin contains TiddlyWiki's core components, comprising: * JavaScript code modules * Icons * Templates needed to create TiddlyWiki's user interface * British English (''en-GB'') translations of the localisable strings used by the core