React Native WebView cache static html page. I set a URL to html page in webview. Worked fine. But when I updated and deployed, the updated content is not shown in WebView in react native IOS app. When I directly to that URL using a browser I see the HTML is updated. Looks it is cache somewhere in the mobile. How do I avoid the cache? Only when I used the "reset content and setting" of the simulator, I see the updated content, otherwise it keep showing the old cached content.
1
votes
1 Answers
0
votes
The command to clear the cache is npm start --reset-cache
(specifically, however you invoke the RN server, pass the --reset-cache
option to it).
If you are working on iOS platform and want to clear react-native cache then you may want to work with this package react-native-http-cache
$ npm install react-native-http-cache --save
See docs. react-native-http-cache