[webkit-dev] Which MIME type is best for JavaScript in WebKit?

Adam Barth abarth at webkit.org
Sat Feb 12 15:12:04 PST 2011

MIME types for JavaScript have a sad, painful history, largely related
to the JavaScript/ECMAScript name fight and the IETF being unhelpful.
For example, here's a note about this topic in the HTML5

Note: The term "JavaScript" is used to refer to ECMA262, rather than
the official term ECMAScript, since the term JavaScript is more widely
known. Similarly, the MIME type used to refer to JavaScript in this
specification is text/javascript, since that is the most commonly used
type, despite it being an officially obsoleted type according to RFC
4329. [RFC4329]

IMHO, we should use text/javascript as it is by far the most commonly
used MIME type for JavaScript, despite what the IETF would have you


On Sat, Feb 12, 2011 at 3:01 PM, Darin Adler <darin at apple.com> wrote:
> Three regression tests are failing on one of my Macs. For local .js files I am getting the MIME type text/javascript and the tests expect application/x-javascript.
> I don’t know why I am getting different results on my computer than on, say, buildbots running the same version of Mac OS X. And also, I am wondering which MIME type is the one we want to see in WebKit for local JavaScript files. I can add Mac-specific code to the ResourceHandle implementation in WebKit to normalize this if that’s helpful.
> Does anyone know the answer to this or have a bug number to point me to?
>    -- Darin
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

More information about the webkit-dev mailing list