ARTICLE AD BOX
I have an issue where when I restart and update my production server, users need to refresh the page manually in order to make use of the code changes. This means users who do not know to do this are potentially accessing the page using a version of the website that contains bugs, missing features or other changes.
To show the issue, I have created a basic react app with npx create-react-app my-app.
I built the and served the page with
npm run build serve -s buildAfterwards, I modified the code to change the background colour to red. The left browser is manually refreshed, while the right side remains running the old version of code.

Expected Behaviour
Upon changing the code (in this example changing the background colour) and running
npm run build serve -s buildall browsers currently connected to localhost:3000 detect that there has been a change in the code and refresh. In this case the page should refresh with the new background colour.
Why this does not work/actual behaviour
Connected clients need to manually refresh page (e.g CTRL + R in chrome like in the left image) in order to view the version of the page that has the red background.
What I have tried
I have tried to google for similar questions. However this has lead to answers related to hot-reloading during development whereas I want the refresh to occur during production.
How can I ensure that code changes are applied automatically without the need for user input?
