I have made several changes to my firebase site https://scratch-gui.firebaseapp.com/ over the past few days. As I'm developing the site, I plan to deploy and build the site regularly.
If I visit the site in my normal browser, none of my recent changes appear. For example, when I visit the homepage, my navigation still looks like this:
But if I visit in an incognito window or a device that has not been to the site before, it looks like this:
I assumed maybe it was due to caching and might take a few hours, but it has been several days at this point. What is the default setting for firebase deploy caching?
My concern is less for development and more for when I share the site with others. I would like changes to appear after a redeploy without users clearing their cache on every visit. Is there a setting for cache refresh time on firebase? What can I do to make sure my users get the latest version of my site?
UPDATE:
I have updated my firebase.json
to the following:
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "*.*",
"headers": [
{
"key": "Cache-Control",
"value": "max-age=30"
}
]
}
]
}
}
It now seems that when I refresh normally, it reverts back to the old site. When I run a hard refresh, it shows the most up to date version of the site. I know this sounds really odd, so I made a video.
Youtube video of refresh vs hard refresh behavior
Now I'm really confused what could be causing this.
UPDATE 2:
Here is the service worker list from the chrome debugger.