Forum Moderators: phranque
I’m uncertain as to how to include my js files. I’ve seen two methods:
What is the different between “text/javascript” and “application/x-javascript”? Do I need both?
Various unregistered media types have been used in an ad-hoc fashion
to label and exchange programs written in ECMAScript and JavaScript.
These include:
+-----------------------------------------------------+
| text/javascript | text/ecmascript |
| text/javascript1.0 | text/javascript1.1 |
| text/javascript1.2 | text/javascript1.3 |
| text/javascript1.4 | text/javascript1.5 |
| text/jscript | text/livescript |
| text/x-javascript | text/x-ecmascript |
| application/x-javascript | application/x-ecmascript |
| application/javascript | application/ecmascript |
+-----------------------------------------------------+
Use of the "text" top-level type for this kind of content is known to
be problematic. This document thus defines text/javascript and text/
ecmascript but marks them as "obsolete". Use of experimental and
unregistered media types, as listed in part above, is discouraged.
The media types,
* application/javascript
* application/ecmascript
which are also defined in this document, are intended for common use
and should be used instead.