Situation:
On mywebsite.com/game, I registered a service-worker with
navigator.serviceWorker.register('/service-worker.js', {scope: "/"});
On my server, '/service-worker.js'
has a maxAge of 1d
.
Problem:
service-worker.js
has a major bug. It always displays an empty page and can't fetch anything. service-worker.js
must be changed.
The problem is whenever a user goes to mywebsite.com/game
, it displays the empty page and does nothing more. I am unable to make the client fetch the new service-worker.js
.
How can I make the client fetch the new service-worker.js
?