Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

119
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda