Here are some key things to remember when creating your progressive web app:
Use a HTTP S connection Service Workers only work on HTTPS. Though localhost is white listed, please make sure that you serve your final code through a HTTPS connection.
Add a kill switch Always add a kill switch for your Service Worker. Caching, although a powerful tool, can go wrong. Please ensure that you append a new version in your cache name whenever you want the older one to be purged.
Avoid CDN s Make sure you serve your Service Worker file from the server instead of a CDN. This ensures that you always serve the fresh version of the file.
Use GET The Cache API specification only allows GET resources to be cached. Resources fetched through other HTTP method will not be cached.
Keep your app shells light Only minimal HTML, CSS and Java Script should go in your app shell – bloating your application shell can cause delay in render, which leads to a bad user experience. Check Service Worker support Service workers aren’t currently supported by all the browsers. Jake Archibald has created a nifty page to check the status of service workers on different browsers: jakearchibald.github.io/ is service worker ready.