ECMAScript Media Types Updates

Approval announcement
Draft of message to be sent after approval:

Technical Summary

This document updates the ECMAScript media types to prefer "text/javascript", obsoletes other related media types, and introduces the new .mjs extension for JavaScript modules in order to align with implementation experience and industry practice. This document obsoletes RFC4329, "Scripting Media Types".

Working Group Summary

When this document was adopted by DISPATCH, it was a fairly simple update of RFC 4329 to update the IANA registrations to prefer "text/javascript" and to mark other related media types as "OBSOLETE". The draft was changed to obsolete RFC 4329 due to WGLC feedback. That document has issues primarily related to how one determines text encoding and the use of file extensions to determine whether content should be interpreted as a module or script. This draft makes minor updates to that original text to align with current operational reality, but it does not attempt to "fix" them in ways that do not reflect current practice. This resulted in some discontent among reviewers who would prefer cleaner fixes vs. document existing practice.

There have also been discontent about unnecessary and somewhat convoluted normative language in RFC 4329. This draft does not attempt to fix that in general, although it has made some simplifications in the text about determining the character-encoding scheme.

Document Quality

The procedures in the draft are understood by this shepherd to be implemented by most web browsers.

The draft has undergone i18n and media-type reviews. John Levine performed a helpful early i18n review of version 07 on 8 May 2020. That review and follow on discussion resulted in improvements in version 08.   The draft was posted to the media-type mailing list on 17 May, 2021. The resulting media-type discussion mainly rehashed issues already discussed (see "Working Group Summary")


The responsible AD is Francesca Palombini. The shepherd is Ben Campbell.