Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load JSON into IndexedDB in JS if we exceed 50 MB #7

Open
Transfusion opened this issue Jan 30, 2021 · 0 comments
Open

Load JSON into IndexedDB in JS if we exceed 50 MB #7

Transfusion opened this issue Jan 30, 2021 · 0 comments

Comments

@Transfusion
Copy link
Member

Transfusion commented Jan 30, 2021

json]$ ls -lah
total 30M
drwxrwxr-x. 2 transfusion transfusion 4.0K Jan 30 19:51 .
drwxrwxr-x. 4 transfusion transfusion 4.0K Jan 27 03:13 ..
-rw-rw-r--. 1 transfusion transfusion 3.2K Jan 30 19:50 baseRadicals.json
-rw-rw-r--. 1 transfusion transfusion 1.5M Jan 30 19:50 forwardMap.json
-rw-rw-r--. 1 transfusion transfusion   73 Jan 30 19:50 processedIDSMetadata.json
-rw-rw-r--. 1 transfusion transfusion 5.5M Jan 30 19:50 readings.json
-rw-rw-r--. 1 transfusion transfusion  21M Jan 30 19:50 reverseMap.json
-rw-rw-r--. 1 transfusion transfusion 873K Jan 30 19:50 strokeCount.json
-rw-rw-r--. 1 transfusion transfusion 576K Jan 30 19:50 variantsIslandsLookup.json
-rw-rw-r--. 1 transfusion transfusion 298K Jan 30 19:50 variantsMap.json

https://stackoverflow.com/questions/60376429/where-in-my-pwa-should-i-be-loading-a-somewhat-large-json-file
iOS has a 50 MiB cache limit

https://developers.google.com/web/ilt/pwa/live-data-in-the-service-worker

For example HTML, CSS, and JS files should be stored in the cache, while JSON data should be stored in IndexedDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant