4

I have received for maintenance a rather primitive react app hosted on firebase (developed by someone else). Now weird things are happening:

  • I change content of a file (even simple text change)
  • Run deploy (hosting) - I see in firebase console that deploy was successful
  • Still: page content is still old, without changes!

How can it be? I use Chrome incognito mode to ensure no cache on browser side, and Firebase docs say that deployment clear server cache.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Andy Victors
  • 335
  • 2
  • 9
  • Was the project set up with create-react-app or something similar? You might be missing the bundling step which takes the react code that you write and prepares it for delivery. In your `package.json`, is there a script that says `build`? If so, you can try running `npm run build` before deploying to firebase. – CDoe Mar 30 '22 at 17:15

1 Answers1

0

Turns out it is about cache setttings of firebase. I've seen people wrote default it is about one hour (sic!) so I overridden the cache header settings as referenced and now it is immediately visible after publishing.

https://firebase.google.com/docs/hosting/manage-cache

Andy Victors
  • 335
  • 2
  • 9