[英]Vue.js clear user cache
I'am deploying a new app version of my Vue.js SPA and got the problem that it's only loads if I clear my cache.我正在部署我的 Vue.js SPA 的新应用程序版本,但遇到的问题是它只有在我清除缓存时才加载。 So for me this is fine but the customers won't get it.
所以对我来说这很好,但客户不会得到它。 Is there a workaround to check the version and force the browser to reload my page?
是否有解决方法来检查版本并强制浏览器重新加载我的页面? My Setup is:
我的设置是:
Best regards.此致。
Maybe it helps somebody.也许它可以帮助某人。
I figured out some things.我想通了一些事情。 First there seems to be a problem with the cli, after some time the file hashing worked again (maybe a update or just a simple clean install).
首先,cli 似乎有问题,一段时间后文件散列再次起作用(可能是更新或只是简单的全新安装)。 Second, I'am using
aws cloudfront
to provide my application, cloudfront caches your site on its endpoints.其次,我使用
aws cloudfront
来提供我的应用程序,cloudfront 将您的站点缓存在其端点上。 So I have to invalidate my cloudfront using所以我必须使用
aws cloudfront create-invalidation --distribution-id YOUR_DISTRIBUTION_ID --paths '/*' --profile YOUR_PROFILE >/dev/null
So everybody got the new page after refreshing.所以大家刷新后都得到了新的页面。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.