devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB

Home Page:https://snuggsi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Content Negotiation: `Content-Type` is being set incorrectly

snuggs opened this issue · comments

Should be application/ecmascript preferably. application/javascript classically

The site should respond with Content-Type: text/html for browsers navigating to root. And Content-Type: application/javascript for <script src=...> tags which fetch using a Accept: application/javascript rule in the request as speced by the whatwg/dom.

I believe you picked up on this @brandondees

capture d ecran 2017-09-14 a 10 10 56

commented

Interesting conventions of addressing the type as application/ecmascript.
Javascript is an extended implementation of the ECMAScript specification. Is there any reason you have configured the project to this convention? @snuggs

@Robertchristopher Developer ergonomics. application/ecmascript .es immediately tells me it's precompiled. Javascript .js let's me know i probably didn't write that. It's been such an ease cognitively. Lots less resistance to the idea than I had last year. Many keep denying this but when I tell them to change the existing documentation it rarely gets changed. ;-) I'm just following a convention around the docs/specs. /cc @tmornini @kurtcagle @brandondees

capture d ecran 2017-10-21 a 21 19 32