Caching React web应用对我来说很好,但对客户端来说只在匿名选项卡上工作

Caching React web应用对我来说很好,但对客户端来说只在匿名选项卡上工作,caching,apache2,create-react-app,Caching,Apache2,Create React App,无论出于何种原因,我的react应用程序只能在我的客户端的匿名选项卡(chrome、firefox、safari)上运行(在以前的版本中,它正常工作),但它对我来说很好,它可以在我尝试过的任何pc/手机和浏览器上运行(除了internet explorer)。另一个问题是internet explorer/edge,它获取了一个已有多年历史的web应用程序版本 我认为这是一个缓存问题,所以我尝试清理客户端缓存并强制网站获取新版本(通过apache配置、html meta和使用registerSe

无论出于何种原因,我的react应用程序只能在我的客户端的匿名选项卡(chrome、firefox、safari)上运行(在以前的版本中,它正常工作),但它对我来说很好,它可以在我尝试过的任何pc/手机和浏览器上运行(除了internet explorer)。另一个问题是internet explorer/edge,它获取了一个已有多年历史的web应用程序版本

我认为这是一个缓存问题,所以我尝试清理客户端缓存并强制网站获取新版本(通过apache配置、html meta和使用registerServiceWorker中的unregister())

在apache上,我添加了:

    Header Set Pragma "no-cache"
    Header Set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
    Header Set Cache-Control "max-age=0, no-store, no-cache, must-revalidate"
    Header Unset ETag
    FileETag None
在我的react index.html上

 <meta http-equiv="cache-control" content="no-cache" />
 <meta http-equiv="expires" content="timestamp">
 <meta http-equiv="pragma" content="no-cache" />

当网站无法正常运行时(在非匿名选项卡上),不会显示任何错误