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

75
Visualizações
how to redirect to another page with a service woker

I have web site for online planning. I added an indexddb and a service worker for manage offline connection. All of my code work perfectly, but I have a littel problem. When I click on a link of my web planning, the browser loads the html of the ligne planning instead of the off ligne html.

I found a solution to this by fetching the POST request, and I can watch the reponse. It's work perfectly.

My question: how can I redirect to html of off ligne planning. I found following code on the web, but it doesn't work:

    if (event.request.url.includes("Visionnage/planningDownload"))
    {
        fetch("http://localhost/index.html",{method:"post",redirect:'follow'})
             .then((e)=>{}).catch((e)=>{})
     }
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