Media type / application
application/wasm
WebAssembly binary modules. The type is mandatory: the streaming compilation APIs reject anything else outright.
Served inline: Browsers have no renderer for this, so it downloads even without a Content-Disposition header. That makes it the quiet default for anything you do not want opened in place.
Browser behaviour
Downloads
Charset
no charset
Compression
Compress in transit
Send it like this
Content-Type: application/wasmA binary payload has no character encoding. A charset parameter here is meaningless and occasionally confuses strict parsers.
Handling verdict
Browsers have no renderer for this, so it downloads even without a Content-Disposition header. That makes it the quiet default for anything you do not want opened in place.
A binary payload has no character encoding. A charset parameter here is meaningless and occasionally confuses strict parsers.
The payload is text-like or otherwise repetitive, so gzip or Brotli removes real bytes. Enable it at the server or CDN.
Registered with IANA through a public review process, so the name is stable and every implementation can rely on it meaning the same thing.
Anatomy of the name
RFC 6838Top-level type
application
Application
Subtype
wasm
Registered in the standards tree.
Structured syntax
none
No suffix, so the payload format is defined entirely by the subtype itself.
Parameters
none
Beyond the charset rule above, this type defines no parameters of its own.
What trips people up
2 notes- instantiateStreaming() fails with a type error if the response is not application/wasm — a misconfigured server breaks it with no fallback.
- The binary compresses well despite being binary, so leave gzip or Brotli enabled for it.
Response headers
Content-Type: application/wasm
X-Content-Type-Options: nosniff
Content-Disposition: attachment; filename="example.wasm"
Vary: Accept-Encodingnosniff stops the browser second-guessing the type you declared, which is what makes the rest of this reliable. Content-Disposition: attachment names the saved file and removes any doubt about rendering.
Server configuration
extension mappingnginx
types {
application/wasm wasm;
}Apache
AddType application/wasm .wasmCaddy
@type path *.wasm
header @type Content-Type "application/wasm"Extensions and other spellings
with signatureFile extensions
File signature
00 61 73 6D
Check these bytes rather than the client-supplied Content-Type when validating an upload. The header is a claim; the signature is evidence.