Re:How to Hack APIs in 2021
by tonyarkles on Tuesday August 10, 2021 @06:46PM
(#28135722)
I’m asking this from a genuine place of curiosity, because last time I checked a few years ago the answer was “terrible”. Has the “save a file locally and load it again later” story for SPAs improved any?
[ Parent
| on HN ]
There is no universal local file system API, so "terrible" might be a reasonable description of this.
There is a Chrome-only local file system API.
Generally SPAs are limited to browser provided storage like IndexedDB.
Re:How to Hack APIs in 2021
by capableweb on Wednesday August 11, 2021 @04:41AM
(#28139539)
I have implemented plenty of SPA (for years) that use the pattern of A) allow the user to download their current state as JSON/EDN and then B) allow the user to upload a new state from JSON/EDN file and continue from where they last downloaded their state.
This has been easy to implement for as long as I can remember, so not sure why'd you say it's terrible. What stopped you previous times?
Re:How to Hack APIs in 2021
by tonyarkles on Thursday August 12, 2021 @08:02AM
(#28155139)
Ok, so that’s kind of what I figured was the current state of things. Compared to being able to hit “Save” and have a local copy updated, that’s a pretty subpar workflow. I get why it’s like that (preventing a sandboxed website from being about to update files on the local filesystem) but...