When I make a new build of a react app, a bundle with serial number is created and included in index.html (example: main.350fc2cb.chunk.js), the browser then cache this bundle and gets it from cache when requested.
When I make any changes and create a new bundle the index.html will have a new version so the browser will work fine because index.html is now requesting different file name.
The issue is that when I make new changes and replace the index.html on the server while the user is already opening the tab of the site, there is nothing to tell the browser to load the new bundle unless refresh -with no cache- is done.
Is there something that can be done so the app will know if there is new content and automatically request it, or at least tell the user to do so?
I am using .Net Core on the back-end side, so any solutions from back-end side is also fine.
I tried to use serviceWorker which is included in the create-react-app app to identify if there is new content available, but it doesn't seem to work unless I open a new tab or refresh the page, and even so refresh with no cache (CTRL + SHIFT + F5) is still needed to load the new bundle.