Commit 3b5ee7f
authored
fix(createTestServer): fix the
The proper MIME type for JavaScript files is "text/javascript", not
"application/javascript". Even though "application/javascript" is on the
list of JavaScript MIME types:
https://mimesniff.spec.whatwg.org/#javascript-mime-type per:
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages
> Servers should use text/javascript for JavaScript resources, in
accordance
> with Updates to ECMAScript Media Types. Servers should not use other
> JavaScript MIME types for JavaScript resources
"Updates to ECMAScript Media Types" is the following RFC:
https://www.rfc-editor.org/rfc/rfc9239
In section "2. Compatibility" it says:
> The most widely supported media type in use is text/javascript; all
others
> are considered historical and obsolete aliases of text/javascript..js MIME type (#27)1 parent d3d80fd commit 3b5ee7f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
0 commit comments