thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
501 stars 30 forks source link

Please add type="text/javascript" to the script tags #262

Closed jmn closed 7 years ago

jmn commented 9 years ago

To fix (X)HTML validation errors.

pbrisbin commented 9 years ago

type="text/javascript"

This attribute is optional. Since Netscape 2, the default programming language in all browsers has been JavaScript. In XHTML, this attribute is required and unnecessary. In HTML, it is better to leave it out. The browser knows what to do.

Source

I tend to agree, and if we plan to support only HTML (not XHTML), I don't want to add that attribute. That said, this is a rather minor thing to do even if we don't fully support XHTML. I'll give it some thought.

Thanks!

sarciszewski commented 9 years ago

The correct MIME Type is application/javascript, which is the default.

jferris commented 9 years ago

Some versions of Internet Explorer fail if you specify application/javascript.