The Cache-Control
header setting in my firebase.json file does not seem to be working. I have set the max-age
value, for all files, to 31536000
(1 year). My firebase.json file is-
{
"hosting": {
"public": "public"
},
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"headers": [{
"source": "**",
"headers": [{
"key": "Cache-Control",
"value": "max-age=31536000"
}]
}]
}
The file seems to abide by the firebase documentation.
But the max-age
value, for all files, is still set to the browser default of 3600
(1 hour).
According to full page configuration you have to set hosting key first.
This have to work: