DevKits

application/*

application/javascript

File extensions: .js, .mjs

JavaScript source served for execution in a browser or Node.

What is application/javascript?

application/javascript is the traditional media type for JavaScript. Modern specs prefer text/javascript, but application/javascript remains widely used and is accepted by every browser and runtime.

Typical usage

External <script src> files, JavaScript modules, Node.js source distributions.

Common gotchas

The HTML spec now recommends text/javascript as the canonical type. Both work — do not mix them within one <script> tag's charset assumptions.

HTTP header example

Response header

Content-Type: application/javascript; charset=utf-8

Reference

RFC 4329 (obsoleted; see HTML Living Standard)

Related MIME types