Opened 14 months ago

Last modified 6 months ago

#1606 new enhancement

WebAssembly doesn't work on Firefox/Chrome due to missing MIME type

Reported by: DesWurstes@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.15.x
Keywords: mime mime.types Cc:
uname -a:
nginx -V: nginx version: nginx/1.15.2


WebAssembly?'s MIME type is application/wasm. If not set; Firefox, Chrome and Vivaldi won't be able to run the WASM.

Here's the Chrome error message:

util.js:1632 wasm streaming compile failed: TypeError?: Failed to execute 'compile' on 'WebAssembly?': Incorrect response MIME type. Expected 'application/wasm'.

Could you please add application/wasm wasm to nginx/conf/mime.types?

Change History (2)

comment:1 Changed 14 months ago by mdounin

  • Keywords mime mime.types added
  • Priority changed from major to minor
  • Type changed from defect to enhancement

Thanks for your suggestion. Note that if you want to add additional types or serve some files with specific custom types, you can do so using the types directive, see the documentation for examples.

Some related facts as found during a quick investigation, just for the record:

Note that we generally only add most popular types to the mime.types as shipped with nginx. It is not currently clear if application/wasm is one of such types, so leaving this open for now. If you are reading this and also want (or don't want) application/wasm to be added, please comment.

comment:2 Changed 6 months ago by dbrgn@…

If you are reading this and also want (or don't want) application/wasm to be added, please comment.

I signed up here to say: Yes, I'd also like to see this type added! :)

The the WebAssembly specification isn't yet complete, though there is a ​public draft.

It's true that the spec isn't complete, but in the meantime the WebAssembly MVP ( has shipped across all major browsers (at least Firefox, Chrome, Edge, Safari).

Oh, and it seems that the mime type has been added to cpython as well.

Note: See TracTickets for help on using tickets.