Content Negotiation: `Content-Type` is being set incorrectly
snuggs opened this issue · 3 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
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