We've also experienced this issue. I wondered why I'd not really experienced this kind of thing before. Usually it's because the site is behind CloudFlare which handles this at CDN level for me.
So I figure the easiest thing to do is just to get nginx to act more like a CDN and ask the browser to hold on to the js/css files for longer.
We've also experienced this issue. I wondered why I'd not really experienced this kind of thing before. Usually it's because the site is behind CloudFlare which handles this at CDN level for me.
So I figure the easiest thing to do is just to get nginx to act more like a CDN and ask the browser to hold on to the js/css files for longer.
This is my proposed solution:
This will tell the browser to cache the files for 2 hours, hopefully by that time, the browser will have refreshed the page and got the new files.
Another idea might be to use a service worker to tell the client that there's a new version of the files and hard refresh.
Hope this helps someone to look at the problem in a slightly different way.