Breaking: #88772 - JavaScript script tags omit type=text/javascript in HTML5

See Issue #88772

Description

When rendering HTML5 output, <script> tags do not the additional attribute type=text/javascript anymore as it is considered optional, and if none given, modern browsers fall back to this type already.

See the official W3C definition here: https://www.w3.org/TR/html52/semantics-scripting.html#element-attrdef-script-type

For this reason, all of TYPO3’s Backend (which is rendering HTML5) and Installer do not include this optional attribute in <script> tags anymore.

For TYPO3 Frontend rendering, the attribute is omitted when having no doctype or HTML5 as doctype configured (via TypoScript config.doctype = html5 ). This leads to a minimal smaller HTML document submitted to the client.

For any XHTML or HTML4-based website, the attribute is still added.

Impact

TYPO3’s Frontend rendering does not render type=text/javascript anymore in <script> tags when rendering a HTML5 output, unless explicitly specified.

Affected Installations

Any TYPO3 installation running a HTML5-based frontend output.

Migration

As all modern browsers do not need this tag, and the specification says it’s optional, there is no migration needed at all.

If still requested by a specific project, it can be added via:

page.includeJS.myfile = EXT:site_mysite/Resources/Public/JavaScript/myfile.js
page.includeJS.myfile.type = text/javascript