Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save Multiple Progressive Web Apps to Home screen from one website

I'm building a website where I would like to be able to have different subfolders act as separate PWA's and be saved to the home screen separately. E.g.

PWA #1 - specifically branded for client #1

~/ClientOne/ClientOnePWA.html

~/ClientOne/serviceworker.js

~/ClientOne/manifest.json

PWA #2 - specifically branded for Other Client

~/OtherClient/OtherClientPWA.html

~/OtherClient/serviceworker.js

~/OtherClient/manifest.json

My question is this: is there any way to have these two exist side-by-side on the same android home screen?

I had thought that since the service workers and manifests were in a separate scope it would treat these as separate web applications, but right now it's treating them as one big application (which I'd really like them to be separate for our business use case).

Currently I can add the PWA for client One to the home screen of an Android device, but then when I go to 'OtherClientPWA.html' I can't add it to the home screen. Instead, it gives me the option to 'Open Client One PWA' where 'Add to home screen' should be on the chrome menu.

Thanks in advance for any insights!


1 Answers

Try to add two sub domain alisas for your app1 and app2 like below.

App1.mydomain.com App2.mydomain.com

This can be routed to ur client1 and otherclient in ur server side. This will help in maintaining two apps in a cleaner way as well as service worker sees it as two different app. This will help keeping two different icons to launch as well.

like image 116
Anand Avatar answered Feb 03 '26 15:02

Anand