I noticed on Firefox 58 I'm getting warnings like this in the console, with
code built on 1.37.28:
wasm streaming compile failed: TypeError: Response has unsupported MIME
type
<https://brionv.com/misc/ogv.js/demo2/lib/ogv-demuxer-webm-wasm.js?version=1.5.6-20180129165148-b88769a3>
falling back to ArrayBuffer instantiation
and the .wasm file shows up twice in the network list in dev tools. The
file is shown as cached on the second load, and in subsequent page views,
but I don't know if that'll hold for larger .wasm executables than my
relatively small codecs.
Fix is to reconfigure the web server to serve .wasm files as
application/wasm instead of defaulting to something like
application/octet-stream.
In Apache, this would be:
AddType application/wasm .wasm
and while one is in there; to also enable transparent gzip:
AddOutputFilterByType DEFLATE application/wasm
This decreases the network transfer size nicely as a bonus. :)
-- brion
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.