Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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