My application served by express.js and index.html rendered by EJS Template Engine
So when i first visit my website, index.html is rendered correctly.
But if I refresh the page, index.html loaded from service worker , because
service worker's cache was the origin index.html file
I want to update some cache data (not all) or how to cache rendered html file.
For example:
If i want to update index.html cache data, How should I do ?
I really need someone's help.
List some angular sw configuration:
ngsw-config.json
{
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "lazy"(prefetch both have tried),
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/*.css",
"/*.js"
]
}
}, {
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**"
]
}
}
]
}
My Dist project struct
/dist
--index.html
--*.js
