-
-
Notifications
You must be signed in to change notification settings - Fork 572
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
Offline support with a Service Worker #109
Comments
Analyzing the app in lighthouse, the following problems are found in the PWA session. By adding the service worker and fixing some icons (there are some great icons generators) it should work |
Icons are not a problem. |
I never write an SW from scratch, but used a lot the ones generated by React CRA for instance, and i never had those problems. I think it can be automatically done by webpack, with some configuration. You will only mess it up if you don't undestand it well to use. About leaving users in a old version of the app and closing every tab of the app to update, normally SW warns you when it has updated, and its your choice how to handle the window update. You can Display a poupo that refreshes the window when clicked, or if your app allow it, just refresh the window (if no data will be lost). About using a cached version forever, it only happens if you mess the versioning generated in the SW (normally it doesn't happen). What normally happens is turning the development mode very exausting when cache enabled (just add a tag for development to disable it) |
Hey just stepping in to say I love this project, +1 to the PWA idea |
i've created many PWAs with CRA. the only problem i've found is icons size. For this, i use an icon generator that generate all icons and a manifest.json file. Them it's just a matter of putting the icons on the public file and updating the manifest.json, there is no need to rewrite service workes, CRA SW works perfectly |
The key thing here is to make sure the service worker and the path to the service worker can be changed easily in the future.
Refreshing should always get you the newest version if you're online.
The text was updated successfully, but these errors were encountered: