4

I have created an app using create-react-app but it always loads old index.html from client

tried with meta tags to avoid cache in index.html but does not load new html always

index.html

UI_Brain
  • 93
  • 1
  • 9

2 Answers2

1

One way can be using the meta tags.<meta http-equiv='cache-control' content='no-cache'> <meta http-equiv='expires' content='0'> <meta http-equiv='pragma' content='no-cache'>

-2

A very Rare condition. sometimes it may be because of your browser cache. there is an option in your Dom inspector which helps to disable caching. press F12 to toggle dom inspector. select the network tab Try the tick on.

Also make sure that you are editing and previewing the same index.html file.

enter image description here

Dulara Malindu
  • 1,477
  • 4
  • 18
  • 37
  • 3
    Hi Dulara, Thanks for your answer, but we cannot tell client / customer to do this, I am looking for solution that can be done progrmatically – UI_Brain Dec 27 '18 at 13:29
  • 1
    Are you using a web caching service like Cloudflare in your distribution flow? Then try deleting the cache from there. https://hazaveh.net/2013/11/how-to-clear-cloudflare-cache/ – Dulara Malindu Dec 28 '18 at 04:11