progressive-web-apps

PWA with multiple pages

我只是一个虾纸丫 提交于 2019-12-05 10:22:25
I'm creating a PWA for my website. It was a multiple page website built using jquery. Now I have created an app shell which consists of a common header for the site. My site has good SEO ranking and ranks in top 3 links usually. Now when I want to go from page A to page B and I want the header to be preloaded and a loader gets displayed until the data for page B is received from the server. I am still using jquery as most of the modules are already built in that and I don't want to rebuild them. Now the only solutions I can think of to achieve this is either using an ajax call or using routes

Is it possible to use the new Push Notifications support in Chrome without GCM?

安稳与你 提交于 2019-12-05 09:49:44
Can I use a push service other than Google's GCM when using the new Push API with service workers? Today, Chrome is the only browser that supports the standard push API so right now the short answer is No. A longer answer involves doing different things for different browsers Safari offers desktop notifications via APNS and a proprietary API Firefox is shipping support for push notifications soon and presumably will use a different push server than GCM. So to summarize, it seems that different combinations of Browser/OS will require different push servers. In the future there is an IETF draft

NullInjectorError: No provider for SwUpdate! SwUpdate does not work Angular 5

吃可爱长大的小学妹 提交于 2019-12-05 09:43:38
Now I know there are a million posts about No Provider for such and such service, I know it needs to go in the providers please read my entire post. Basically I am trying to use SwUpdate to check to see if there is an update if so, refresh the browser: import { SwUpdate } from '@angular/service-worker'; ... export class ... constructor( private _swUp: SwUpdate ){} ngOnInit() { this.checkForUpdate(); } checkForUpdate() { if (this._swUp.isEnabled) { this._swUp.available .subscribe(() => { window.location.reload(); }); } } now I have registered my serviceworker: import { ServiceWorkerModule }

Is it possible to track geolocation with a service worker while PWA is not open

走远了吗. 提交于 2019-12-05 08:21:49
Is it possible to read from local storage and track geolocation in PWAs with a service worker while app is not open on phone (in background) So far my research is pointing to no, and I am finding that the PWA needs to be open for location services. Thank you, The solution is at hand and has been for some years now as this POC clearly testifies. Unfortunately W3C and lobbyists such as Jake Archibald have fought tooth and nail to prevent it from being made available :-( Why? I know not. The "cui bono" argument points to plug-in vendors such as Ionic whose whole raison d'etre appears to be

How To Log Whether PWA Is Being Viewed As A Website Or App

那年仲夏 提交于 2019-12-05 08:02:19
I'm working on a PWA (progressive web app) and I would like to be able to track whether someone is just viewing it as a website or if they installed it and are viewing it as an app. Is there any way to do this? I can't think of any ways, since they both use the same files (both use manifest.json and manifest.json directs both to the same index.html). Windows 10 gives the ability for PWAs to be installed from their app store. At that point, you might be able to gather some analytics. Unfortunately, that would be a limited install-base (compared to just installing it from the browser). Option 1

OIDC and PWA (add to home screen)

淺唱寂寞╮ 提交于 2019-12-05 06:22:40
Update: Basically the same issue as Standalone PWA breaks login but on iOS. If you add a web app to the home screen, Chrome on android shares the local storage with the same domain in the browser. You can test this by going to https://wilfrem.github.io/add_to_homescreen_test/ then adding to home screen and see you have the same id when opened from home screen. (I did Nexus 5x) If you do the same in iOS Safari you get a new id. (i did iPod iOS 12.1.1) The oidc-client-js library sets a session reference in local storage and then recalls that on the web app s signin callback. So if you try to log

Strategy for Push notifications on Safari

喜你入骨 提交于 2019-12-05 05:25:10
I am working on implementing a PWA which needs to send push notifications, we are looking at a solution for sending push notifications to browsers running on ios(We are using Firebase(FCM) for everything else.) What would be a good strategy to make push notifications on all platforms including ios? We are looking at sniffing the user-agent and use FCM for non-ios users, switch to websockets for ios users. We aren't sure how viable this approach is gonna be. Any suggestions on this approach or a better alternative would be of great help! It looks like you can treat Safari like an APNS device:

Progressive web app(PWA) vs Electron vs Browser extension

泪湿孤枕 提交于 2019-12-05 04:23:51
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 stick to something like a progressive web app because everything is done off-line. Because I wanted to

Manifest start_url is not cached by a Service Worker

孤者浪人 提交于 2019-12-05 00:54:08
I'm using Lighthouse to audit my webapp. I'm working through the failures, but I'm stuck on this one: Failures: Manifest start_url is not cached by a Service Worker. In my manifest.json I have "start_url": "index.html", In my worker.js I am caching the following: let CACHE_NAME = 'my-site-cache-v1'; let urlsToCache = [ '/', '/scripts/app.js', '/index.html' ]; Which lines up with what I see in the Application tab in Chrome Dev tools: So... why is it telling me start_url is not cached? Here is my full worker.js file: if ('serviceWorker' in navigator) { window.addEventListener('load', function()

Push notifications progressive web app on iOS

谁说我不能喝 提交于 2019-12-05 00:21:18
I need to develop a progressive web app with push notifications integrated. Searching on the web I have found diverse opinions about this subject. If I have understood correctly, for now, we cannot have push notifications in safari for mobile (but only for Desktop). Is it right? Do you have any suggestions to obtain the same result (I am not an iOS expert)? I was wondering that maybe developing a native app only for push notifications purposes could be a good choice until push notification will be ready also for safari mobile. P.S. I am developing the PWA using Angular 2. Thank you for the