sw-precache

How to remove a service worker registered in previous deploy from users' browsers with the newly deployed version of site (Firebase)?

痴心易碎 提交于 2019-12-04 17:13:28
I've deployed a new version of my site (It was on Polymer, now on Vue.js) to Firebase over an existing project. I'm using default Vue.js template with Webpack ( vue init webpack my-project ) in the new project Now that I've deployed the new version, when I open the site I see just a cached shell, I assume that's the service worker's fault In order to get actual current files from Firebase I (and all the previous visitors) have to now hard refresh the site every time ( Ctrl+F5 in firefox) Console Now, in browser console (network tab) I see: The service worker in red, it says: (failed) net::ERR

Using sw-precache with client-side URL routes for a single page app

房东的猫 提交于 2019-12-03 16:16:10
How would one configure sw-precache to serve index.html for multiple dynamic routes? This is for an Angular app that has index.html as the entry point. The current setup allows the app to be accessable offline only through / . So if a user go to /articles/list/popular as an entry point while offline they won't be able to browse it and would be given you're offline message. (although when online they'd be served the same index.html file on all requests as an entry point) Can dynamicUrlToDependencies be used to do this? Or does this need to be handled by writing a separate SW script? Something

“New version available” with service worker and sw-precache

佐手、 提交于 2019-11-30 20:16:18
I'm trying to use sw-precache , but I must be doing something wrong! I'm mostly using the demo code available from the github repo and can't seem to get updates to the app to come through. Once it's cached the first time, it never checks for new versions. I was expecting that when I publish a new service worker, the browser would request the new service worker and update the cache accordingly in the background. Then using the registration code in the example , I would be able to prompt the user to refresh and get the latest version from their newly refreshed cache. Would really appreciate if

Progressive Web App (PWA) in standalone mode OAuth error

◇◆丶佛笑我妖孽 提交于 2019-11-29 07:09:30
After I saved my PWA (Test App) built using Create React App to homescreen and launched the app in standalone mode on android using chrome and iOS using safari. Then in the app I initiate Firebase method signInWithPopup(GoogleProvider) the device asks me if I want to open the action with Test App or other browsers installed on device i.e chrome , firefox . If I select to open with my Test App the popup opens and I select the correct Google account. Error: After the google account selection the popup closes without ever redirecting back to my Test App . If I instead to open the Firebase method

How to modify auto generated service-worker in Create-React-App

一笑奈何 提交于 2019-11-29 06:52:46
I have created a sample app from Create-React-App library. When I ran the build command then it generates a service-worker on its own using cache-first strategy. But I need some more functionality like cache some API responses n all. I don't know how to modify the script which includes my own code in auto generated service-worker. I have found some help lines for my case but these are not enough to get a whole understanding of it. By default, the generated service worker file will not intercept or cache any cross-origin traffic, like HTTP API requests, images, or embeds loaded from a different

Progressive Web App (PWA) in standalone mode OAuth error

谁说胖子不能爱 提交于 2019-11-28 00:40:34
问题 After I saved my PWA (Test App) built using Create React App to homescreen and launched the app in standalone mode on android using chrome and iOS using safari. Then in the app I initiate Firebase method signInWithPopup(GoogleProvider) the device asks me if I want to open the action with Test App or other browsers installed on device i.e chrome , firefox . If I select to open with my Test App the popup opens and I select the correct Google account. Error: After the google account selection

How to modify auto generated service-worker in Create-React-App

≯℡__Kan透↙ 提交于 2019-11-28 00:20:30
问题 I have created a sample app from Create-React-App library. When I ran the build command then it generates a service-worker on its own using cache-first strategy. But I need some more functionality like cache some API responses n all. I don't know how to modify the script which includes my own code in auto generated service-worker. I have found some help lines for my case but these are not enough to get a whole understanding of it. By default, the generated service worker file will not