progressive-web-apps

PWA - manifest attribute “display”: “standalone” not working on Android

左心房为你撑大大i 提交于 2019-12-10 17:25:15
问题 I've noticed a really weird behaviour of my PWA. I can launch it in "standalone" mode on Windows, but when I'm trying to do the same on my Android device it's ignoring the "standalone" value and opens the url in Chrome (Android 7.0, Chrome-Android v62.x). It also doesn't work in Chrome-Android Beta v63.x (relating to this post what refers to a bug in chrome 62.x ). I've checked the manifest file with the Manifest Validator and Lighthouse. Both tools validated the file and don't show me any

Angular Service worker with FCM push notification

青春壹個敷衍的年華 提交于 2019-12-10 15:53:58
问题 In my web app(using Angular4) I am using "@angular/service-worker": "^1.0.0-beta.16" for generating service worker and also using firebase-messaging-sw.js for FCM push notification, angular/service-worker creates worker-basic.min.js only in production build. Now, how to use these 2 service-workers together?? 回答1: I can respond about using simultaneously : sw-precache Service Worker (whose aim is to cache static ressources) implemented as service-worker.js . See https://coryrylan.com/blog/fast

PWA Add To Home screen button in Chrome with Angular 4

大兔子大兔子 提交于 2019-12-10 15:27:56
问题 I have started working on PWA with Workbox3. And it is working out pretty amazing so far. I have added code to Add to Home Screen button so User can add it to there Mobile's Home screen. But the prompt box to add icon on Home screen showing only single time. Once I added that Icon to Home screen then after that it if I delete it and try same again then it shows nothing. I am checking in Desktop chrome from Chrome's DevTool->Application->Mainfest sectoin->Add to Home Screen . My Service worker

Service Worker not working in Offline mode with node js server

橙三吉。 提交于 2019-12-10 13:32:51
问题 I am trying to build a PWA with an offline first policy. The server for the source files is a NodeJS server . I am currently testing this on a localhost node server (not sure it has an impact ?). Service worker + caching seems fine, but in offline mode I only get the Chrome Offline Page . Let's get into details : The page which is served (through the http://localhost:8080/place/test url) has some client side JS, in which I register a Service Worker : client.js if ('serviceWorker' in navigator

how to make a request to GCM to send a notification via XHR

浪尽此生 提交于 2019-12-10 12:01:03
问题 actually i want to make a request to GCM to send a notification through XHR I already make request to GCM using the cURL utility but i don't know how to do it with XHR. Is there any way to do that 回答1: Good news! There's a dedicated page as well as a demo of your inquiry in the documentation! 回答2: You can not. At least, not directly because GCM API does not include CORS headers so it is not intended to be used from the browser. You need to send a signal to your own server and replicate the

How to send push notifications in Chrome(Progressive Web Apps)

若如初见. 提交于 2019-12-10 12:00:45
问题 Please explain how to do push notifications with XHR and Javascript. or is there any other way to send push notifications in progressive web apps. I have created curl command and when i execute it in my terminal push notification sent but how to do it on button click? Here is my cURL command:- curl --header "Authorization: key=AIzaSxUdg" --header Content-Type:"application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"cxA-dUj8BTs:APAvGlCYW\"]}" This is what i have

Cache Firebase Database for offline usage? with Javascript

筅森魡賤 提交于 2019-12-10 11:46:15
问题 I am trying to cache firebase database information for offline usage. In my ProgressiveWebApp, I am using javascript and jquery. Is there a way to mirror database without using polymer Thank you 来源: https://stackoverflow.com/questions/40954993/cache-firebase-database-for-offline-usage-with-javascript

Service Worker slow response times for css

蹲街弑〆低调 提交于 2019-12-10 10:49:58
问题 We have service worker written on top of sw-toolbox. Once the static resources are cached service worker is taking longer time especially for downloading css resources (30 - 100ms) where as for js resources the time is almost 0. CSS load times : Load 1 : 35ms Load 2 : 25ms Load 3 : 101ms Load 4 : 22ms Js load times : Load 1 : 0 ms Load 2 : 0 ms Load 3 : 0 ms Load 4 : 0 ms Question : 1.Why css load times are higher with service worker? Would be really helpful to us if someone can provide

iOS 12 does not support offline feature of some PWAs

半城伤御伤魂 提交于 2019-12-10 10:25:05
问题 iOS 12 Safari does not support the offline feature of some PWAs (Progressive Web App). It seems like Safari does not cache resources in those web apps properly. For example, the following PWAs cannot work offline in iOS 12 and 12.1, but they all work perfectly in Chrome on Android or Windows: The Air Horner PWA that is used by google to demonstrate Service Worker: Air Horner And these two: 2048 puzzle Voice Memos Steps to reproduce (100% reproducible): visit the PWA with Safari (iOS 12 or 12

Progressive web app(PWA) vs Electron vs Browser extension

时光毁灭记忆、已成空白 提交于 2019-12-10 03:50:08
问题 The background for this question is that I've been working on what I'd call a tool in which a user can build modules that they can later run. It started out as a small web page and has grown over the last year into something that more closely resembles a desktop application; but, at this point, is still just a set of html, css, and js files. I considered using something like electron to package it as an installable desktop application, but I didn't like that approach and thought it better to