Skip to content
This repository has been archived by the owner on Jul 31, 2018. It is now read-only.

clarify the exact MIME for .mjs #61

Closed
wants to merge 3 commits into from
Closed

Conversation

bmeck
Copy link
Member

@bmeck bmeck commented Aug 9, 2017

No description provided.

@bmeck
Copy link
Member Author

bmeck commented Aug 9, 2017

requested by jshttp/mime-db#88

Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Trott
Copy link
Member

Trott commented Aug 9, 2017

Arguably out of scope for this document, but if people are looking to us for the answer on MIME type, this is certainly the answer I'd expect us to give. So 👍

@bmeck bmeck requested a review from ChALkeR August 9, 2017 14:08
@ChALkeR
Copy link
Member

ChALkeR commented Aug 9, 2017

The first part looks good:

The MIME used to identify .mjs files should be a web compatible JavaScript MIME Type

But I'm not sure about this

preferably application/javascript

because I don't know what's going on the application/javascript vs text/javascript question and which one is preferred now and by whom.

Perhaps /cc @domenic for that.

Note that I'm not implying that I prefer to see text/javascript there — I would have asked the exact same question if this change mentioned text/javascript as the preferrable mime type.

@bmeck
Copy link
Member Author

bmeck commented Aug 9, 2017

@ChALkeR we could remove the second sentence?

@ChALkeR
Copy link
Member

ChALkeR commented Aug 9, 2017

@bmeck I guess we could, this change would make sense even without mentioning the preferred one of those.

That addition of the preferred mime has its value, so if the decision could be made in a reasonable amount of time to favor one of those for some valid reasons, so I would prefer it to be mentioned, but if that won't be achieved — merging this without an exact preferred mimetype LGTM.

Copy link
Member

@ChALkeR ChALkeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but either after elaborating (not in the patch itself, but in GitHub comments and/or commit comment) why should the mentioned preferred exact type (whatever it would be) be preferred, or with removing the «preferred» part if there would be no informed decision on that in a reasonable time.

@domenic
Copy link

domenic commented Aug 9, 2017

text/javascript is preferred on the web generally; I believe some RFC tried to obsolete it, but it's the most prevalent on the web, so the HTML spec just made it the default.

@bmeck
Copy link
Member Author

bmeck commented Aug 9, 2017

linked to HTML spec and updated

@ChALkeR
Copy link
Member

ChALkeR commented Aug 9, 2017

@bmeck I am still not entirely sure if the HTML spec is the correct source for this.
What do other members of TC39 think? Is this opinion by @BrendanEich actual?

@ChALkeR
Copy link
Member

ChALkeR commented Aug 9, 2017

  • ECMAScript spec doesn't specify a mime type.
  • IANA specifies application/javascript, and calls text/javascript «obsolete», but IANA isn't a very actual/up-to-date source.
  • HTML spec specifies text/javascript and calls application/javascript «legacy» (upd: not any more), but HTML spec probably shouldn't be the primary source for JavaScript mime type.
  • RFC 4329 specifies application/javascript as the primary and calls text/javascript «obsolete», but that's not even a spec (and it's 11 years old).
  • @BrendanEich from TC39 wrote 6 years ago that the correct one is application/javascript (referring to RFC 4329) and that text/ isn't even the correct category and should not be used.
  • @domenic from TC39 says that text/javascript is correct one today and that application/javascript is not, and refers to the HTML spec.

@domenic
Copy link

domenic commented Aug 9, 2017

HTML spec probably shouldn't be the primary source for JavaScript mime type.

I dunno. HTML is the spec for web browsers, and web browsers are the major client that (a) cares about MIME types and (b) executes JavaScript. So I think it's a pretty good place for it.

@bmeck
Copy link
Member Author

bmeck commented Aug 9, 2017

I would agree with @domenic here

@bmeck
Copy link
Member Author

bmeck commented Aug 11, 2017

@ChALkeR are you ok with text/javascript since it is a preference, and it is not a mandatory thing? Is it ok to merge this PR?

bmeck added a commit that referenced this pull request Aug 14, 2017
@bmeck
Copy link
Member Author

bmeck commented Aug 14, 2017

landed in 6eef91d

@bmeck bmeck closed this Aug 14, 2017
@ChALkeR
Copy link
Member

ChALkeR commented Aug 30, 2017

@bmeck Sorry for a very delayed response on this 😞, I had some personal availability issues, hopefully resolved now.

The PR as landed in 6eef91d looks good to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants