Enhance
This commit is contained in:
parent
6cd795e29c
commit
6a3f4baed3
2 changed files with 30 additions and 0 deletions
|
@ -121,3 +121,10 @@ set of defaults for bundling our app into a static export which we can then
|
|||
deploy to our webserver. In addition, the Next.js page router is convenient.
|
||||
Apart from this, while we use a few tidbits from Next.js here and there, overall
|
||||
our apps are regular React SPAs, and are not particularly tied to Next.
|
||||
|
||||
### Vite
|
||||
|
||||
For some of our newer code, we have started to use [Vite](https://vitejs.dev).
|
||||
It is more lower level than Next, but the bells and whistles it doesn't have are
|
||||
the bells and whistles (and the accompanying complexity) that we don't need in
|
||||
some cases.
|
||||
|
|
|
@ -8,9 +8,32 @@ cleared when the browser tab is closed.
|
|||
|
||||
The data in local storage is tied to the Document's origin (scheme + host).
|
||||
|
||||
Some things that get stored here are:
|
||||
|
||||
* Details about the logged in user, in particular their user id and a auth token
|
||||
we can use to make API calls on their behalf.
|
||||
|
||||
* Various user preferences
|
||||
|
||||
## Session Storage
|
||||
|
||||
Data tied to the browser tab's lifetime.
|
||||
|
||||
We store the user's encryption key here.
|
||||
|
||||
## Indexed DB
|
||||
|
||||
We use the LocalForage library for storing things in Indexed DB. This library
|
||||
falls back to localStorage in case Indexed DB storage is not available.
|
||||
|
||||
Indexed DB allows for larger sizes than local/session storage, and is generally
|
||||
meant for larger, tabular data.
|
||||
|
||||
## OPFS
|
||||
|
||||
OPFS is used for caching entire files when we're running under Electron (the Web
|
||||
Cache API is used in the browser).
|
||||
|
||||
As it name suggests, it is an entire filesystem, private for us ("origin"). In
|
||||
is not undbounded though, and the storage is not guaranteed to be persistent (at
|
||||
least with the APIs we use), hence the cache designation.
|
||||
|
|
Loading…
Add table
Reference in a new issue