I am working on a progressive web app in angular 4 which seems to be working fine in online mode. It does work on offline mode as well unless I involve dynamic caching.
So there is this ngsw-manifest.json in which I have done some configuration:
{
"routing": {
"index": "/index.html",
"routes": {
"/": {
"match": "exact"
},
"/coffee": {
"match": "prefix"
}
}
},
"static.ignore": [
"^\/icons\/.*$"
],
"external": {
"urls": [
{
"url": "https://fonts.googleapis.com/icon?family=Material+Icons"
},
{
"url": "https://fonts.gstatic.com/s/materialicons/v29/2fcrYFNaTjcS6g4U3t-Y5ZjZjT5FdEJ140U2DJYC3mY.woff2"
}
]
},
"dynamic": {
"group": [
{
"name": "api",
"urls": {
"http://localhost:3000/coffees": {
"match": "prefix"
}
},
"cache": {
"optimizeFor": "freshness",
"networkTimeoutMs": 1000,
"maxEntries": 30,
"strategy": "lru",
"maxAgeMs": 360000000
}
}
]
}
}
So the dynamic key in the above json caches the content on the page for offline use.
Here is an image of the content being cached:
However when I try to reload the page in offline mode after caching, the content is not being shown. Is there some configuration that I missed?

shellof your web application using a service worker. Using the app shell + dynamic content model greatly improves app performance and works really well with service worker caching as a progressive enhancement. However, when service workers are not supported in your browser, the assets are not cached offline but the content is still fetched over the network and the user still gets a basic experience.