Re: Javascript mime type

Tim Williams <[email protected]>
Newsgroups gmane.text.xml.forrest.devel
Message-ID <CAG_bHoyQwF6thVjXZYOgC9Sd7sEA8QgqNuU7=jg09KoZEwdE-w@mail.gmail.com>
I'd say text/javascript or application/javascript is the right answer.
Omitting it feels pretty wrong though.

--tim

On Thu, Jan 24, 2013 at 4:01 PM, Sjur Moshagen <[email protected]> wrote:
> Hello,
>
> In the file '$FORREST_HOME/main/webapp/resources.xmap' there's the following match:
>
>       <map:match pattern="**skin/**.js">
>         <map:read src="{lm:skin.js.{2}}" mime-type="application/x-javascript" />
>       </map:match>
>
> x-javascript looks kind of strange and old. This is what wikipedia has to say about javascript mime type (http://en.wikipedia.org/wiki/Internet_media_type):
>
> «• application/javascript: ECMAScript/JavaScript; Defined in RFC 4329 (equivalent to application/ecmascript but with looser processing rules) It is not accepted in IE 8 or earlier - text/javascript is accepted but it is defined as obsolete in RFC 4329. The "type" attribute of the <script> tag inHTML5 is optional. In practice, ***omitting the media type of JavaScript programs is the most interoperable solution,*** since all browsers have always assumed the correct default even before HTML5.»
>
> (my emphasis)
>
> If there are no objections, I will just remove the mime type from that (and similar) match(es).
>
> Sjur
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.