teleclimber / Dropserver

An application platform for your personal web services. https://dropserver.org
Apache License 2.0
42 stars 1 forks source link

Integrate Deno's localStorage into appspace storage #54

Open teleclimber opened 2 years ago

teleclimber commented 2 years ago

See this for Deno's localStorage: https://deno.land/manual@v1.16.4/runtime/web_storage_api

According to docs we can tie local storage to the location, as set by --location, which is this:

--location <HREF>                                   
            Value of 'globalThis.location' used by some web APIs

We should probably set that anyways to something sensible, like maybe the appspace address?

Another concern is around import/export of appspace data.

teleclimber commented 2 years ago

deno info shows "Origin storage" location as ~/Library/Caches/deno/location_data but I don't have anything in there yet to see what that looks like.

teleclimber commented 1 year ago

Note that getting the right location is hard / buggy: https://github.com/denoland/deno/issues/13084

teleclimber commented 1 year ago

Anything we do for localStorage we should do for sessionStorage too, naturally.

Edit: sessionStorage is unaffected because its data is meant to go away on sandbox exit anyways.