简体   繁体   English

Blazor WASM - 发布后应用程序出错(我认为是由于缓存)

[英]Blazor WASM - Errors on application after publishing ( due to cache i think)

After publishing website occurs some strange errors every time.每次发布网站后都会出现一些奇怪的错误。

  • Unknown error occurred while trying to verify integrity.尝试验证完整性时发生未知错误。
  • service-worker.js:22 Uncaught (in promise) TypeError: Failed to fetch at service-worker.js:22. service-worker.js:22 Uncaught (in promise) TypeError: Failed to fetch at service-worker.js:22。
  • Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]

When i open the web application on browser's icongito mode everything is ok, so i think the problems becomes from cache.当我在浏览器的 icongito 模式下打开 Web 应用程序时,一切正常,所以我认为问题来自缓存。

Also it occurs mainly on Chrome.它也主要发生在 Chrome 上。 On firefox is ok after first Ctrl + f5 refresh.在第一次 Ctrl + f5 刷新后,在 Firefox 上就可以了。

What can cause this strange behaviour, and what can be the solution?什么会导致这种奇怪的行为,解决办法是什么?

After removing PWA(Progressive web application) the behaviour stopped to exists.删除 PWA(渐进式 Web 应用程序)后,行为停止存在。 The error occured from Offline cache on browser (Cache - Cache Storage - offline-cache).错误来自浏览器上的离线缓存(缓存 - 缓存存储 - 离线缓存)。 maybe in .NET 6 release will be better perforance.也许在 .NET 6 版本中性能会更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM