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)=>{})
}