Which is better or more convenient to use:
Do you need a type attribute at all? If you're using HTML5, no. Otherwise, yes. HTML 4.01 and XHTML 1.0 specifies the
type attribute as required while HTML5 has it as optional, defaulting to
<script>...</script> is valid and a good choice.
As to what should go in the type attribute, the MIME type
which are also defined in this document, are intended for common use and should be used instead.
However, IE up to and including version 8 doesn't execute script inside a
<script> element with a
type attribute of either
application/ecmascript, so if you need to support old IE, you're stuck with