如何避免为create-react-app缓存 [英] How to avoid caching for create-react-app
问题描述
我已经使用create-react-app创建了一个应用程序,但是它总是从客户端加载旧的index.html
I have created an app using create-react-app but it always loads old index.html from client
尝试使用元标记以避免在index.html中缓存但不会始终加载新的html
tried with meta tags to avoid cache in index.html but does not load new html always
index.html
index.html
推荐答案
一个非常罕见的条件。有时可能是因为您的浏览器缓存。在您的Dom检查器中有一个选项可以帮助禁用缓存。
按F12切换dom检查器。选择网络选项卡
尝试打勾。
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.
还要确保您正在编辑和预览相同的index.html文件。
Also make sure that you are editing and previewing the same index.html file.
这篇关于如何避免为create-react-app缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!