Skip to content
EPUBCheck · Resources and references

EPUBCheck RSC-035: legacy JavaScript media type

Updated:

EPUBCheck RSC-035 is a usage message: “"…" is a legacy media type for JavaScript. Consider using 'text/javascript' instead.” A script uses a legacy media type for JavaScript, and EPUBCheck suggests text/javascript instead. It is a usage message, shown only with -u: the script still counts as JavaScript.

The official message

"%1$s" is a legacy media type for JavaScript. Consider using 'text/javascript' instead.

Default severity
Usage. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • Manifest items or script elements written with an older value such as application/javascript.
  • Templates and tools that predate text/javascript becoming the recommended value.

How to fix it

  1. Find the media type named in the message.
  2. Change it to text/javascript in the manifest item and in any script element type attribute.
  3. Validate again with -u if you want a clean usage report.

When it's not this

A script with a non-JavaScript media type is the error RSC-034.

Terms used here

Other RSC messages

  • RSC-034 Scripts must have a JavaScript media type.
  • RSC-033 Relative URL strings must not have a query component, but found one in "…".
  • RSC-032 Fallback must be provided for foreign resources, but found none for resource "…" of type "…".
  • RSC-031 Remote resource references should use HTTPS, but found "…".
  • RSC-030 File URLs are not allowed in EPUB, but found "…".
  • RSC-029 Data URL is not allowed in this context.

Sources

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

FAQ

What does EPUBCheck RSC-035 mean?

EPUBCheck RSC-035 is a usage message: “"…" is a legacy media type for JavaScript. Consider using 'text/javascript' instead.” A script uses a legacy media type for JavaScript, and EPUBCheck suggests text/javascript instead. It is a usage message, shown only with -u: the script still counts as JavaScript.

Is RSC-035 an error?

RSC-035 is reported as usage by default. Informative only and hidden by default: it appears when EPUBCheck runs with -u (--usage). It does not make the EPUB invalid.