diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index f25872102b8c27..d5b83f8e4f71d2 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -436,7 +436,7 @@ def _default_mime_types(): '.jpe' : 'image/jpeg', '.jpeg' : 'image/jpeg', '.jpg' : 'image/jpeg', - '.js' : 'application/javascript', + '.js' : 'text/javascript', '.json' : 'application/json', '.ksh' : 'text/plain', '.latex' : 'application/x-latex', diff --git a/Misc/NEWS.d/next/Library/2018-10-02-18-33-30.bpo-34875.8Js9dJ.rst b/Misc/NEWS.d/next/Library/2018-10-02-18-33-30.bpo-34875.8Js9dJ.rst new file mode 100644 index 00000000000000..79f1b09cff2dc6 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-10-02-18-33-30.bpo-34875.8Js9dJ.rst @@ -0,0 +1,3 @@ +Change mimetype for file extension ``.js`` to ``text/javascript``. This is currently the recommended mimetype in the whatwg HTML spec + +https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages