I'm trying to add pwa capabilities to a website running on angular 8. I followed a lot of tutorials, official and unofficial ones and I don't understand what I'm doing wrong.
ngsw-config.json is like this :
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js",
"/*.min.js"
],
"urls": [
"https://fonts.googleapis.com/**"
]
}
}, {
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
]
}
I can see in Chrome dev console Application tab that the service worker is registered and running.
But I've got two main problems.
It seems the index page can't be served, the service worker is still registered and running.
I can see in online mode that I get the index page from the Service worker, so why is it not working in offline mode ?
- In online mode, I can see from the network tab that every requests are cached, even the ones from the api. But I did not configure dataGroups in ngsw-config.json so why is this happening ? Same for external js files not specified in the url array of assetGroups.
The site can be tested here : https://dev.ecni.fr/
Thanks !
EDIT : Same problem when trying with different up to date browsers on two computer running windows. However, working fine with chrome on a mac. What's happening with windows computers ?