I have a PWA hosted on firebase. Everything is good. I have a little issue: whenever I update the code. It doesn’t update on my users’ devices when they get in. The whole code gets stored on cache and they are not up to date with the version. They have to manually click on the link and hit enter - on Chrome - to refresh the cache. On Safari, I have to refresh the page like four times for it to refresh it.
Is there anything I can do so I can trigger an update on everyone’s phone?
The problem was that the ng build --prod was outputing the same hash over and over. Caches look at this hash to see if there are updates. So, as browsers see the same hash, they don’t update the code and it gets cached.
The best solution is, instead of ng build --prod, I use ng build --prod --outputHashing=none