I have been trying to implement angular PWA and have setup the config file as below:
{
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(eot|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani|html)"
]
}
}
],
"dataGroups": [
{
"name": "api-performance",
"urls": [
"/Languages"
],
"cacheConfig": {
"strategy": "freshness",
"maxSize": 500,
"maxAge": "3d"
}
}
]
}
In the config I have set so that the whole assets folder is pre-fetched for offline use. It is working as expected but now I want to show a loader or status to inform the users that all the data required for the offline use has not been completely prepared and they need to wait.
Is there any way to figure out if the prefetch process has started/ended or anything that might help us to know about the status of prefetched items.