seed-rs / seed-quickstart

Bare essentials to start a Seed app.
https://seed-rs.org/
101 stars 28 forks source link

Add preload links #40

Closed pingiun closed 3 years ago

pingiun commented 3 years ago

Preload the javascript and wasm bundles. In my firefox network waterfall I can see this speeds up downloading as it can do it in parallel, then when the fetch() happens in the javascript file, the wasm bundle will be available already (or almost).

https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content

MartinKavik commented 3 years ago

@pingiun Thanks! Please make sure we don't need modulepreload instead of preload for JS. I've recently written a blog post with some words about it.

Note: Firefox doesn't show many warnings and errors, please test it in Chrome and look at its console if there isn't a warning or something like that.

MartinKavik commented 3 years ago

@pingiun Can we merge it?

pingiun commented 3 years ago

@MartinKavik yep I think it's good now. Tested in chrome and it gives no errors