Media type / application
application/octet-stream
Arbitrary binary data — the registered fallback when nothing more specific is known, and the type that guarantees a download.
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
Already compressed
Send it like this
Content-Type: application/octet-streamA 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 format compresses internally. Another transport encoding costs CPU on both ends and typically changes the size by less than a percent — sometimes upward.
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
octet-stream
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- This is the safe default for serving untrusted uploads: no browser renders it, so nothing in it can execute in your origin.
- Seeing it on a resource you expected to render usually means the server has no mapping for that extension.
Response headers
Content-Type: application/octet-stream
X-Content-Type-Options: nosniff
Content-Disposition: attachment; filename="example.bin"nosniff 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/octet-stream bin dms lrf so;
}Apache
AddType application/octet-stream .bin .dms .lrf .soCaddy
@type path *.bin *.dms *.lrf *.so
header @type Content-Type "application/octet-stream"