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

Make PWA #14

Open
octokatherine opened this issue Jan 1, 2022 · 1 comment
Open

Make PWA #14

octokatherine opened this issue Jan 1, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@octokatherine
Copy link
Owner

Make word master a PWA for offline play

@octokatherine octokatherine added the help wanted Extra attention is needed label Jan 1, 2022
@kishore881
Copy link
Contributor

👋Hi.. I've done some research on PWA for React apps. It seems to be done with service workers, which can cache the resources required for the app, making them available offline. Based on my research, this is what I think the necessary steps are

  • update the manifest to contain fields name, short_name, start_url and scope
  • Register the service-worker which can be done directly in public/index.html as shown here or call a similar function from src/index.js as followed in cra-template-pwa
  • Then add the service-worker itself in the public folder, which should handle fetch and install events to enable the offline mode

This is what the dev tools showed when I tried this with the current manifest, ⚠️s on Installability of PWA

Manifest

The third ⚠️ says no service worker found, even though an SW is active. It has something to do with scope and start_url in the manifest.

Service Workers

So updating the manifest seems to be the first step. Since in index.html, all resources are hardcoded to be pulled from this repo. So, updating that would make it easier to work on service-worker and test rapidly in dev env.

Let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants