Opened 5 years ago
Closed 5 years ago
#31080 closed Cleanup/optimization (fixed)
Remove redundant type="text/javascript" attribute from <script> tags
Reported by: | Jon Dufresne | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In HTML5, the default script type is JavaScript. Specifying the default type is not recommend.
From https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-type
Omitted or a JavaScript MIME type: This indicates the script is JavaScript. The HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type.
From https://html.spec.whatwg.org/multipage/scripting.html#the-script-element
Authors should omit the type attribute instead of redundantly setting it.
Change History (3)
comment:1 by , 5 years ago
Has patch: | set |
---|
comment:2 by , 5 years ago
Triage Stage: | Unreviewed → Ready for checkin |
---|
https://github.com/django/django/pull/12200