4

I just deployed a very basic react application that I created using create-react-app and then I built the app and deployed it through the Firebase CLI. When I changed something in the app and then built and deployed it again, I couldn't see the changes on the website when I refreshed the page. After some troubleshooting I figured out that this a cache issue and the browser just uses the older version of the file instead of reloading the new one. Which made sense because when I cleared the cache (or opened the window in incognito mode) I saw the changes I made.

My question is how would this work in a real world application? You can't expect or depend on the users to clear their cache.

ninesalt
  • 4,054
  • 5
  • 35
  • 75

1 Answers1

0

This question has been answered here Firebase Hosting: cache busting scripts on deploy You need to set the cache headers in firebase.json

Josh Pittman
  • 7,024
  • 7
  • 38
  • 66