Issue with cache on React Native app

Hello,
Me and my team are developing a React Native app and we are facing (from what we think) a cache issue after the deployment.
We have an older version of our app in the staging and production environment, but in staging when we are deploying new versions of the app, the modifications doesn’t appear. The even stranger thing, is that when we deploy a new version directly to production environment, the modification are visible for me, but not for my collaborators. When they hard refresh the webpage, the modifications are visible, but as soon as they refresh the page normally, the modifications are gone.
We tried to add that in the netlify.toml file in the staging environment :

[[headers]]
for = “/index.html”
[headers.values]
cache-control = ‘’’
max-age=0,
no-cache,
no-store,
must-revalidate’’’

We also tried the “Clean cache and deploy site” option on the Netlify’s dashboard, and it doesn’t work either.

Here’s our staging webpage : GreenGo
And here’s our production webpage : GreenGo

Thanks and have a nice day !

Some things to note:

The headers that you’ve added are not needed. Netlify adds them automatically anyways.

This option doesn’t affect browser cache. It just clears the cached Node Modules, and dependencies for your website. So, it anyways won’t make a difference here. Not a problem if you do it, but I thought I’d clarify that if there was some confusion.

For Netlify to be able to verify your claims about cached responses, the support team would need the request id from here as we don’t know how your website was supposed to look without cache (and how it’s looking with it):

image

Hi,
Thanks for the clarification about the npm cache, that’s what I thought it was, but I wasn’t sure about it.
About the website in production and staging environment, the top container of the route app.laconsignegreengo.com/deposit should be white (#ffffff) but instead it’s green-ish (#d4ffeb).

Here’s my request id : x-nf-request-id: 025e16d7-d89f-4f96-8302-7a80f97dc392-11344416

Here’s my collaborator #1 request id : x-nf-request-id: e426e0f0-2fe3-412e-b760-f0b8b82d2b7a-9950780

Here’s my collaborator #2 request id while performing a hard refresh on Chrome : x-nf-request-id: 47326000-5413-4fc9-b1d7-aa68ec9e4b1e-88959816 (now the new version is available)

and here’s the request id while performing a normal refresh x-nf-request-id: d3c7c111-afaa-45a3-b71b-ba8113103570-24768577 (now the older version is back)

Thanks

Thanks a lot for this detailed response. I’m sure it’ll help the support team investigate the issue.

Meanwhile, can you try if this is relevant: No cache update with Create React App?

Hello,
Thanks for you advice, I’ll check that out.
We are also on another solution, we are trying to see if by disabling PWA (with expo build:web --no-pwa) it could help the app updating.
Thanks