Repository navigation
Change .js mime to "text/javascript" #79056
Description
Activity
I propose to change the mapping of file extension .js to mime type "text/javascript" from "application/javascript.
"text/javascript" is the currently documented best practice in the whatwg HTML spec.
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:javascript-mime-type
- added3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
on Oct 2, 2018 It should be noted that the HTML spec also says:
The term "JavaScript" is used to refer to ECMA-262, rather than the official term ECMAScript, since the term JavaScript is more widely known. Similarly, the MIME type used to refer to JavaScript in this specification is text/javascript, since that is the most commonly used type, despite it being an officially obsoleted type according to RFC 4329.
https://html.spec.whatwg.org/#dependencies:willful-violation
- changed the title
[-]Change .js mime to "test/javascript"[/-][+]Change .js mime to "text/javascript"[/+]on Oct 3, 2018 By RCF 4329 https://tools.ietf.org/html/rfc4329#page-9 text/javascript is obsoleted, application/javascript is a part of the standard.
WhatWg is a controversial group. Their specs don't always follow official standards but Python does.
Sorry, I should decline the proposal.
Feel free to raise an issue again if IETF will change their opinion.
There is a IETF proposal that would make "text/javascript" no longer obsolete.
Will revisit at the point this lands
https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/
We can return to the question when (and if) the draft will be accepted.
MylesBorins commented
on Jun 17, 2019 MylesBorinsmannequinMannequinAuthorMore actionsHey All,
I'd like to reopen this. We are almost done with the IETF standardization of .mjs, and part of this process is making obsolete application/javascript in favor of text/javascript.
--> https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/
- added3.9 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixesand removed3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life
on Jan 17, 2022 Myles, it looks like the draft 14 contains a mismatch in 6.2.1:
6.2.1. text/ecmascript
Type name: application
Subtype name: ecmascriptIn header it's
text, in details it'sapplication. Is it intended?I believe that a typo wouldn't pass though fourteen revisions but nevertheless, just to be safe.
Following up to this old thread + this earlier discussion: RFC 9239 now unequivocally resolves this disagreement. Patch: #92627
- added3.12only security fixesonly security fixesand removed3.9 (EOL)end of lifeend of life
on May 27, 2022
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: