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

Draft: PWA support #408

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

gormonn
Copy link

@gormonn gormonn commented Nov 15, 2023

PWA allows you to install a book as an application on a smartphone or computer, having previously cached the necessary resources.

This is an alternative way to read a book offline. And unlike classical methods (epub/pdf), interactivity is preserved, including viewing and editing shaders.

Additionally, if there are updates to the book, the PWA will be able to update to the latest version when the network comes online.

This will work well on Android.
And it’s not clear how it will work on the iPhone, due to small caching quotas.
The resource dump is about 70 MB, including pages in all languages, shaders, styles, and libraries.

Basic functionality has been implemented, but not yet tested.

Estimated roadmap:
[ ] - cache only the language that the user selects
[ ] - give the user the choice to launch the service worker explicitly, at the user’s request, to avoid network load
[ ] - remove garbage
[ ] - add useful information to manifest.json
[ ] - update docker-compose? (it is necessary to rebuild the service-worker build before restarting the server in order to update the caching keys for those files that have been changed)
[ ] - move code from src/pwa to git submodule?
[ ] - test cache invalidation when updating resources
[ ] - test the build

@gormonn gormonn marked this pull request as draft November 16, 2023 06:25
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

Successfully merging this pull request may close these issues.

None yet

1 participant