progressive-web-apps

firebase auth not work with PWA installed on Android desktop

為{幸葍}努か 提交于 2019-12-01 06:44:34
I have built a SPA that works in the browser in that on load it provides an auth option, I click google signin and the firebase auth flow continues until I have an auth token etc. I can then switch the PWA and use as normal. But if I then logout, I cannot log back in again with the App using Google Auth - whether I let the google signin popup run in the App or in Chrome, no confirmation ever gets abck to the App and indeed it seems to crash. The issue has something to do with the loading of the additional tab for the google signin. According to the onscreen dialog Android asks me whether to

Can users clear the service worker cache?

大憨熊 提交于 2019-12-01 06:36:13
I've built a Progressive Web App that uses caching, but it's unclear to me whether users can (accidentally or on purpose) clear the service worker cache, which may clear my tracking data. When a user clears their browsing data / cookies, this clears all site storage which includes the SW cache, cookies, local storage, indexeddb, and any other local caching system. Furthermore, Ctrl-F5 forces a cache refresh, and is intended to abandon all cached content including service worker cache and just retrieve all content from the servers again. "Clear site data" in Chrome 76 will delete the caches and

Site cannot be installed: no matching service worker detected

。_饼干妹妹 提交于 2019-12-01 02:22:23
Hey I am trying to program my first pwa and got the following problem: when I start my web app I get the following error: Site cannot be installed: no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest I think my manifest url is right because of this link manifest.json "start_url": ".", "display": "standalone", "orientation": "portrait", "theme_color": "#29BDBB", "background_color": "#29BDBB" and I register my sw like this: if ('serviceWorker' in navigator) { navigator

Can I have multiple PWAs on the same domain under different URL paths?

江枫思渺然 提交于 2019-11-30 23:56:00
For example, can I create a PWA under example.com/todo-app , another one under example.com/time-tracking-app , and have each as a completely separate app that can be "installed" with a different icon on the home screen, have its own separate notifications, etc.? You can do it if each separate PWA has: a link to a different manifest uses Service Workers that have non-overlapping scopes. That means you have to register them with scopes that look something like navigator.serviceWorker.register('/sw.js', {scope: './todo-app/'}) and navigator.serviceWorker.register('/sw.js', {scope: './time

“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

How to close a progressive web app

こ雲淡風輕ζ 提交于 2019-11-30 19:56:32
Once a pwa is installed a mobile device, how do I close the application like a native app without having the user click the back button multiple times. I understand it's a bad idea to window.close on a web page but this a pwa on a mobile device. In Cordova you will use navigator.app.exitApp , this is of course not available on pwa. This is a solution I created today. When you click the back button a dialog will request you to just click the back button one more time to actually close the app, or Cancel to go back to the page. The whole thing uses some manipulation of the history, and it works

Dynamic icon PWA manifest

泄露秘密 提交于 2019-11-30 19:16:08
问题 I am making a white label PWA using angular5. I am wondering if it is possible to dynamically change the png icon in the manifest file on info from the URL. I want a different icon for each unique organization. like: www.mywebsite.com/organisation1 www.mywebsite.com/organisation2 URL 1 should get a different icon when installed on the browser then URL2. I do not have a clue on how to make this work and if it is even possible. 回答1: Jeff's link will guide you in the right direction. Your

add to home screen not showing up PWA

自作多情 提交于 2019-11-30 18:28:19
I've created a Progressive Web App. It's simple, just an index.html, a folder "images" with favicon etc, a sw.js et a styles.css My code from manifest.json { "lang" : "en", "name" : "Test", "short_name" : "Test", "icons" : [ { "src": "images/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "images/android-chrome-144x144.png", "sizes": "144x144", "type": "image/png" } ], "theme_color" : "#116b20", "background_color" : "#1a1a1a", "scope" : "1", "start_url" : "/test", "display" : "standalone", "orientation" : "natural" } and sw.js self.addEventListener('install',

Can I have multiple PWAs on the same domain under different URL paths?

谁都会走 提交于 2019-11-30 18:04:22
问题 For example, can I create a PWA under example.com/todo-app , another one under example.com/time-tracking-app , and have each as a completely separate app that can be "installed" with a different icon on the home screen, have its own separate notifications, etc.? 回答1: You can do it if each separate PWA has: a link to a different manifest uses Service Workers that have non-overlapping scopes. That means you have to register them with scopes that look something like navigator.serviceWorker

PWA - cached video will not play in Mobile Safari (11.4)

荒凉一梦 提交于 2019-11-30 15:53:08
I'm struggling to create a simple POC for iOS PWA with a small video. https://test-service-worker.azurewebsites.net/ I have simple service worker registration and I cache a small (700kB) video. When I'm online the page works just fine. When I turn on airplane mode and go offline, the page is still reloaded but video will not play. This POC is based on Google Chrome example https://googlechrome.github.io/samples/service-worker/prefetch-video/ The video from this example will not work in iOS offline for sure because it only caches 50MB. Mine is only 700kB so well below the limit. My POC works