Adding .mjs to list of known MIME types#34318
Conversation
https://datatracker.ietf.org/doc/html/draft-ietf-dispatch-javascript-mjs has been submitted for publication to the IESG. We anticipate that browsers may start enforcing the correct `Content-Type` header for javascript modules prior to execution. As an aside, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#aside_%E2%80%94_.mjs_versus_.js
|
this looks great @shirhatti The only thing I'll point out is that browsers already do enforce the correct |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@shirhatti this also needs tooling support, since VS will not colorize .mjs files |
src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs
Outdated
Show resolved
Hide resolved
…r.cs Co-authored-by: Stephen Halter <halter73@gmail.com>
|
Triage note: This is different than
@shirhatti Do you really think this is likely? Why would a browser be that strict and reject "application/json". |
That was phrased poorly. I don't expect browsers to stop executing application/javascript, but they will not serve mjs files without text/javascript or application/javascript |
https://datatracker.ietf.org/doc/html/draft-ietf-dispatch-javascript-mjs has been submitted for publication to the IESG. We anticipate that browsers may start enforcing the correct
Content-Typeheader for javascript modules prior to execution.As an aside, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#aside_%E2%80%94_.mjs_versus_.js
👀 @MylesBorins