Do you remove "Language" from your script tag?

Updated by Brady Stroud [SSW] 1 year ago. See history

123
<introEmbed body={<> Years ago, it was common to have the "language" attribute within the script tags. This attribute was used to specify the scripting language of the contents of this element. </>} />

Since these identifiers are not standard, this attribute has been deprecated in favor of "type".

<script href="script.js" language="javascript"></script>

❌ Figure: Figure: Bad example - Language attribute has been deprecated

<script href="script.js" type="text/javascript"></script>

✅ Figure: Figure: Good example - The scripting language is specified as a content type

Read more on W3C - Specifying the scripting language.

Acknowledgements

Tiago Araujo
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star