#1407 closed defect (invalid)
Should application/javascript be text/javascript in mime.types
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | other | Version: | 1.13.x |
Keywords: | Cc: | ||
uname -a: | Linux ip | ||
nginx -V: | nginx version: nginx/1.12.1 |
Description
I think the 'content-type' header for js files should have media type 'text/javascript' (not 'application/javascript')
nginx version: nginx/1.12.1
Change History (2)
comment:1 by , 7 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Why do you think so?
See https://tools.ietf.org/html/draft-ietf-dispatch-javascript-mjs-00#section-4.2
This document proposes updates to the ECMAScript media types,
superseding the existing registrations for "application/javascript"
and "text/javascript"
In particular see:
- https://tools.ietf.org/html/draft-ietf-dispatch-javascript-mjs-00#section-4.2 (makes
application/javascript
"Intended usage: OBSOLETE") - https://tools.ietf.org/html/draft-ietf-dispatch-javascript-mjs-00#section-4.6 (makes
text/javascript
"Intended usage: COMMON")
And see also https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages:
Servers should use
text/javascript
for JavaScript resources. Servers should not use other JavaScript MIME types for JavaScript resources, and must not use non-JavaScript MIME types.
Why do you think so?
According to RFC 4329 (April 2006):