Search code examples
c#.netblazorwebassembly

Why my Blazor Wasm app is downloading 90 .wasm files every page refresh?


I have a Blazor 8 Wasm app that is working fine, but in every page refresh/navigation it tooks many seconds to load. Looks like the web assembly files are not being cached.

When I look in the network tab, 90 files are being downloaded every time: 90 .wasm files in chrome network tab

I thought the .NET runtime would be download only on the first access when using WebAssembly.

What could it be?

These are the packages I have installed:

enter image description here

Thanks!


Solution

  • Like someone in the comments mentioned, the status code is 304, meaning 'Not Modified'. This means the browser intercepted it and sent the cached version back instead of re-requesting it from the server.