On 4/25/19 3:35 PM, Charles Plessy wrote:
Le Wed, Apr 17, 2019 at 05:53:18PM +0200, Basile Starynkevitch a écrit :
Most recent web browsers support JavaScript modules (their file extension is
usually .mjs). See
https://developers.google.com/web/fundamentals/primers/modules
The conventional MIME type should be text/javascript for .mjs files.
Hi Basile,
the IANA website lists text/javascript as obsolete, and points to
RFC4329, which does not refer to the mjs file extension (obviously since
it is from 2006).
Would it be possible that you, Google, or somebody else sorts this out
with the IANA ?
In any case, we have time sinze Debian is frozen :)
Sorry. I am not that motivated. Contacting Google or IANA or an RFC
author is well beyond what I could accept to do. I know nobody there.
I am just observing that without such a trivial patch to
/etc/mimes.type, my bismon <https://github.com/bstarynk/bismon/>
software does not work. And my understanding so far is that the bug is
not mine.
And the mjs extension is mentioned in
https://developers.google.com/web/fundamentals/primers/modules and that
is /exactly/ the reason I am using it.
If you know some more authoritative source about MIME types or file
extensions of JavaScript modules (as seen from a browser) please share
it with me.
*Regarding web technologies in general, I am really a newbie.* My
expertise is elsewhere (persistent systems, static source code analysis,
compilation - I did contribute to GCC in the past, related to its
plugin infrastructure). Since I will be retired in 3 or 4 years, I won't
even have time to become professionally an expert in web technologies.
I am surprised by your analysis. AFAIK, the mjs extension is unusual
(since quite new, and was not used for other usages before). You
practically won't break things by putting it in /etc/mime.types, because
that extension is rarely used. I am sure that in 2019 there are lots of
extensions still figuring in /etc/mime.types which do not matter anymore
(because they are related to obsolete or rarely used software, e.g. uls
- in my understanding it is MicroSoft specific) in practice/. /However,
that .mjs extension and its mime type is understood by major /recent/
web browsers (e.g. both Chrome & FireFox).
Or are you suggesting that both Chrome and FireFox are buggy, because
they accept wrongly (and work well in practice) JavaScript /modules/
with .mjs associated to text/javascript (and that works /as documented/
here <https://developers.google.com/web/fundamentals/primers/modules>).
Do you suggest me to open a bug on FireFox? Maybe it is one, but as I am
explaining, I am a web technology newbie, and I am just relating you my
very limited experience.
Regards
--
Basile STARYNKEVITCH == http://starynkevitch.net/Basile
opinions are mine only - les opinions sont seulement miennes
Bourg La Reine, France