progressive-web-apps

Can a progressive web app be registered as a share option in Android?

独自空忆成欢 提交于 2019-12-03 04:15:55
问题 Total newbie question. Tl;dr - Can a progressive web app be registered as a share option in Android? In Android, we can “Share” things to other installed Android apps. For example, let’s say I have Chrome for Android and the Google+ app installed on my Android device. I can share a web site which I am viewing in Chrome to Google+ by going to Chrome’s hamburger menu → Share… → Google+ (with a list of other installed native apps). Can a progressive web app be registered in this list of

How to add analytics for Push notifications

偶尔善良 提交于 2019-12-03 03:41:11
I'm working on progressive web app, and I want to implement analytics for Push notifications. How can I add analytics for push notifications so that I'll be able to track and record how many people clicked on notification and how many people close that notification without clicking on it. Matt Gaunt I've written a small chunk of code to use Google analytics for analytics and it works fairly well. Dumped notes here: https://gauntface.com/blog/2016/05/01/push-debugging-analytics The way I've done this is the post mentioned above: In the service worker I import a javascript file that does the

Update Service Worker in Facebook Browser

北城余情 提交于 2019-12-03 03:26:37
Got a problem where some of our users have a buggy Service Worker sitting in their Facebook Browsers from our sites. The problem: Facebook App users are getting our 'you are offline page' on the FB browser when they access our pages shared on FB. The bug appeared to be that an old version of Google's Workbox (3.6.1) was automatically returning the 'You Are Offline' page in the FB app using Chrome 75. Updating Workbox fixed it. The reference to Workbox was in the service worker, so when we updated our Workbox version (which fixed the issue) some users still had the old one cached. If users

Recommended precache payload size?

牧云@^-^@ 提交于 2019-12-03 03:21:53
(Publicly asking/answering on behalf of someone.) I'm using Workbox to generate a service worker that precaches resources for my progressive web app. Am I wrong to be reluctant to precache ~20mb of minified JavaScript? It's huge, obviously. 20mb seems way too much. My plan was to just precache the essential stuff, and use runtime caching for the rest. In other words, what are some general heuristics for determining what should and shouldn't be included in the precache payload? There's a lot of nuance here, and the right answer comes down to a mix of understanding your users and understanding

Cordova + Angular 4 + Typescript boilerplate template

拜拜、爱过 提交于 2019-12-03 03:04:24
I'm working on a Web Progressive App using Angular 4. This app needs to be wrapped up in an Apache Cordova as a Hybrid app built for Android and iOS platforms. I'm looking for a working boilerplate template for Cordova + Angular 4. Cordova is using www folder for web app and Angular 4 is using src folder for web app. How to merge this two together to work? Angular 'ng serve' should also work? I finally manage to solve my problem. We need to merge Cordova "www" folder and angular "src" folder in one "src" folder where angular app should be. package.json needs to be merged as well to fit for

What is progressive web app solution for IOS [closed]

末鹿安然 提交于 2019-12-03 00:44:14
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I was wondering what's the solution of progressive web app for IOS devices since their default brower SAFARI doesn't yet support progressive web apps. Whats the alternate then for IOS counterparts? 回答1: Please mind that "Browsers that support Progressive Web Apps" is not a real

How do I sync data with remote database in case of offline-first applications?

有些话、适合烂在心里 提交于 2019-12-03 00:29:09
I am building a "TODO" application which uses Service Workers to cache the request's responses and in case a user is offline, the cached data is displayed to the user. The Server exposes an REST-ful endpoint which has POST, PUT, DELETE and GET endpoints exposed for the resources. Considering that when the user is offline and submitting a TODO item, I save that to local IndexedDB, but I can't send this POST request for the server since there is no network connection. The same is true for the PUT, DELETE requests where a user updates or deletes an existing TODO item Questions What patterns are

Any way yet to auto-update (or just clear the cache on) a PWA on iOS?

[亡魂溺海] 提交于 2019-12-02 21:18:12
I have been struggling on iOS with something that works easily on Android: Getting my PWA to auto-update when there is a new version. I am not at all sure this is even possible on iOS. I have used vue.js and Quasar to build my app, and everything works out of the box on Android. Here is the (ugly, terrible) way things stand currently on the iOS version: I can check my own server for the version and compare it against the current one stored in my app (in indexedDB) and throw up a notice that there is a new version. So far so good. Other than having the user MANUALLY CLEAR THE SAFARI CACHE (!!)

PWA Application is initialized every time after going background in iOS

≯℡__Kan透↙ 提交于 2019-12-02 20:42:34
I'm now testing PWA application. In Android, it works well. Even after going background, PWA app keep condition and user can continue their experience. But in iOS, every time after PWA app goes background, it is initialized and every condition is crushed like it is reloaded. User experience is terminated. How can I prevent this in iOS? Update : With the latest version of iOS(I've tested with 12.4), PWA state is preserved. Thanks to Leox and Roshil on confirming the same with another version. Original answer to handle older version of iOS/Safari : As mentioned in this article , iOS still doesn

Why am I seeing “Error - Only secure origins are allowed” for my service worker?

 ̄綄美尐妖づ 提交于 2019-12-02 18:33:57
When I try to add a service worker on my progressive web app page, why does the browser console show the following error? ERROR "Uncaught (in promise) DOMException: Only secure origins are allowed JS Code: (function () { 'use strict'; // TODO add service worker code here if ('serviceWorker' in navigator) { navigator.serviceWorker .register('service-worker.js') .then(function () { console.log('Service Worker Registered'); }); } })(); Try using http://127.0.0.1:8080 for hosting locally instead of http://192.168.29.53:8080 From Service Worker FAQ : Q: I get an error message about "Only secure