classification
Title: Change .js mime to "text/javascript"
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ammar2, asvetlov, mylesborins
Priority: normal Keywords: patch

Created on 2018-10-02 22:28 by mylesborins, last changed 2019-06-17 17:49 by mylesborins.

Pull Requests
URL Status Linked Edit
PR 9678 closed mylesborins, 2018-10-02 22:39
Messages (6)
msg326920 - (view) Author: Myles Borins (mylesborins) * Date: 2018-10-02 22:28
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
msg326923 - (view) Author: Ammar Askar (ammar2) * (Python triager) Date: 2018-10-02 23:21
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
msg327006 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2018-10-03 19:43
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.
msg327007 - (view) Author: Myles Borins (mylesborins) * Date: 2018-10-03 19:49
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/
msg327010 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2018-10-03 19:55
We can return to the question when (and if) the draft will be accepted.
msg345883 - (view) Author: Myles Borins (mylesborins) * Date: 2019-06-17 17:49
Hey 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/
History
Date User Action Args
2019-06-17 17:49:23mylesborinssetstatus: closed -> open
resolution: rejected ->
messages: + msg345883
2018-10-03 19:55:13asvetlovsetmessages: + msg327010
2018-10-03 19:49:12mylesborinssetmessages: + msg327007
2018-10-03 19:44:10asvetlovsetstatus: open -> closed
resolution: rejected
stage: patch review -> resolved
2018-10-03 19:43:51asvetlovsetnosy: + asvetlov
messages: + msg327006
2018-10-03 19:36:55asvetlovsettitle: Change .js mime to "test/javascript" -> Change .js mime to "text/javascript"
2018-10-02 23:21:54ammar2setnosy: + ammar2
messages: + msg326923
2018-10-02 22:39:23mylesborinssetkeywords: + patch
stage: patch review
pull_requests: + pull_request9066
2018-10-02 22:28:39mylesborinscreate