You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@brandondees we'll need to update Koa, (at minimum), Rails, Sinatra, Express, for the new .mjs and existing .es extensions. Many servers respond with application/octetstream for .mjs and .es. This is problematic and causes a Content-Disposition due to the spec stating to NEVER run that media type (for obvious security reasons). Luckily we can just update the core libs for respective platforms and cure most of the (sane) frameworks in the meantime. Anything that prevents the downloading of these files.
Same holds true for .mjs files. Therefore a TON of servers are "broken" with this feature/bug (including ourselves).
I'm on it this weekend. This list and Resource.assets will be just about it for this PR. https://snuggsi.es can be active then and unpkg.com will work properly for people migrating to JS modules which will be very shortly here. Lastly, web/WHATWG/W3C/IETF/HTML/Fetch/DOM specs are fairly in order as media types have been an ancient 💩 show for about a decade now.
P.S. Breaking changes to servers as 90% of them respond incorrectly with application/javascript....The conclusion was made that there is either text or binary (application) code. Nothing else.
PRs & Issues
text/javascript
as the media type for JavaScript resources webhintio/hint#568(New) Specification
In defense of
.js
@brandondees we'll need to update Koa, (at minimum), Rails, Sinatra, Express, for the new
.mjs
and existing.es
extensions. Many servers respond withapplication/octetstream
for.mjs
and.es
. This is problematic and causes aContent-Disposition
due to the spec stating to NEVER run that media type (for obvious security reasons). Luckily we can just update the core libs for respective platforms and cure most of the (sane) frameworks in the meantime. Anything that prevents the downloading of these files.This prevents people from linking to
unpkg
. As a band aid we create a.es.js
file 💩For example >>> http://unpkg.com/snuggsi/dist/snuggsi.min.es vs http://unpkg.com/snuggsi/dist/snuggsi.min.es.js
Same holds true for
.mjs
files. Therefore a TON of servers are "broken" with this feature/bug (including ourselves).I'm on it this weekend. This list and
Resource.assets
will be just about it for this PR.https://snuggsi.es
can be active then and unpkg.com will work properly for people migrating to JS modules which will be very shortly here. Lastly, web/WHATWG/W3C/IETF/HTML/Fetch/DOM specs are fairly in order as media types have been an ancient 💩 show for about a decade now.@tmornini may need your guidance on the protocol to update golang source code.
text/x-javascript
is on the MUST NOT USE list as far as the platform is concerned. What should we do to notify them? https://golang.org/src/mime/type.goRelated
.mjs
to IETFtext/javascript
Media typeapplication/ecmascript
to respect.mjs
extensionapplication/ecmascript
.mjs
to mime types database for defaulttext/javascript
.mjs
,.es
.mjs
,.es
.mjs
to mime types database with rest of the following WHATWG approved Media Typesmime-types
https://github.com/jshttp/mime-types/blob/master/package.json#L17node-mime
broofa/mime@f60fbe2type-is
https://github.com/jshttp/type-is/blob/master/package.json#L13accepts
https://github.com/jshttp/accepts/blob/master/package.json#L12compressible
https://github.com/jshttp/compressible/blob/master/package.json#L19koa
https://github.com/koajs/koa/blob/master/package.json#L42express
(viatype-is
library) https://github.com/expressjs/express/blob/master/package.json#L57The text was updated successfully, but these errors were encountered: