# RSC-034: script without JS media type, how to fix it

Source: https://epubcc.com/epubcheck/rsc-034/ (updated 2026-11-04)

EPUBCheck RSC-034 is an error message: “Scripts must have a JavaScript media type.” A script is declared with a media type that is not a JavaScript media type. EPUB 3.3 lists application/javascript, application/ecmascript and text/javascript as the core media types for scripts.

- Official message (EPUBCheck 5.4.0): Scripts must have a JavaScript media type.
- Default severity: Error

## Typical causes

- A manifest item for a .js file with a wrong media-type, such as text/plain or application/x-script.
- A script element whose type attribute names something other than JavaScript.

## How to fix it

1. Find the script named in the message.
2. Set the media type to text/javascript in the manifest item and in the script element's type attribute (or remove type on script elements, which defaults to JavaScript).
3. Validate again.

## When it's not this

An older JavaScript media type that still works only gives the usage message RSC-035.

## Sources

- EPUB 3.3, §3.2 Core media types: https://www.w3.org/TR/epub-33/#sec-core-media-types (read 2026-11-04)
- EPUB 3.3, §6.3.2 Scripting: https://www.w3.org/TR/epub-33/#sec-scripted-content (read 2026-11-04)

Message text and severity: EPUBCheck (W3C, BSD-3-Clause). Explanation: EpubCC.
