1

After pushing some changes to a React app and deploying it, I navigated to the site (e.g. https://www.somereactapp.com) and the changes are not shown.

Subsequently I refreshed the page and the updates are shown in the app and it works fine.

However after the refresh I went back to type out the same site https://www.somereactapp.com in the address bar and press enter, it reverted back to the old page again.

Am unable to find out why this is so on google chrome

1
  • if you had serviceworker it may be related to that, also are you using hash naming in app.js ? Commented Sep 25, 2019 at 13:34

1 Answer 1

1

Usually, this happens if the index page does not have a no-cache header. When we do not have the no-cache header, browser tries to cache index.html and does not know about the new version of the app.

However after the refresh, I went back to type out the same site https://www.somereactapp.com in the address bar and press enter, it reverted back to the old page again. --> Never come across this, curious to find out the solution.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.