torhovland / blazor-realworld-example-app

Starter kit for new RealWorld framework implementations
https://realworld.io
134 stars 26 forks source link

Not caching mono.wasm? #1

Closed conficient closed 6 years ago

conficient commented 6 years ago

Had a play with your Blazor demo - looks good! I noticed watching the network stats that mono.wasm has no caching tag

Cache-Control: no-cache

As it's 1MB in size it would improve performance a lot if you could enable that.

torhovland commented 6 years ago

Hi!

First issue, cool :-)

Are you sure you don't have "Disable cache" set in your browser dev tools? I'm seeing the same behavior with that set. But without it, mono.wasm is read from disk cache in 200 ms.

conficient commented 6 years ago

Yes I didn't have Disable cache set. Retested again this morning (browsing to the page, navigate away and back) - chrome is disk caching it on the second load. I'll close this.

conficient commented 6 years ago

I did notice there is a big delay (about 1.5 seconds) between mono.wasm loading and then BlazorRealWorld.dll loading - I assume this is Blazor booting up.

torhovland commented 6 years ago

Yes, and as a Blazor app developer, we don't have much control over it. We just include this fragment and the framework handles the rest:

<script type="blazor-boot">
</script>