Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
Building multiple Progressive Web Apps on the same domain

I am wanting to have two progressive web apps for a domain www.xyz/user1.com and www.xyz/user2.com.

I have tried to do this in each of the user1 and user2 HTML files:

<script>
    if ('serviceWorker' in navigator) {
        navigator.serviceWorker
            .register('/sw.js'), {
                scope: '/'
            }
                .then(() => {
                    console.log('Service worker registered');
                })
                .catch(err => {
                    console.log('Service worker registration failed: ' + err);
                });
    }
</script>

As well as creating two separate manifest.json files with:

{
  "short_name": "User 1",
  "name": "User 1",
  "icons": [
    {
      "src": "/img.png",
      "type": "image/png",
      "sizes": "512x512"
    }
  ],
  "start_url": "/?source=pwa",
  "display": "standalone",
  "theme_color": "#fff"
}

This does not work as when I download the PWA from one domain, the other domain just wants to open with that PWA - e.g. when I download User1, I can then only open User2 with User1 whereas I want these as two separate apps. Any help would be appreciated!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda