ReactJS: How to prevent browser from caching static files?
问题 I'm working on my project using ReactJS and I use create-react-app to create my app. After building project, I use my server to serve the build folder. And when I update my app, the browser of user still uses the old version of my app because it caches the static files (js, css). So is there any way to prevent browser from caching static files ? Thank you ! 回答1: TLDR: You will want to send caching instructions via HTTP headers. The Cache-Control header has several directives to control cache