My web app is like this:
I have an Apache server running on port 80, with virtual hosts for my domain and different subdomains, including port 443 for SSL.
I have a nodejs application running on port 5000.
All traffic to my main domain is redirected using proxypass from apache to nodejs.
NodeJs then loads Service Workers.
Problem:
ON first load of application in online mode it works properly.Shows Service worker registered over the complete domain message as expected. Even for some css,js and img it return response fromServiceWorker.
But now when I open same page on offline mode service worker dont play it part to open the web app.
Error: 1. Uncaught (in promise) TypeError: Failed to fetch(…).
- An unknown error occurred when fetching the script for service-worker file.
Any help on this regard to implement this properly will be be helpful.