|
Posted by Erwin Moller on 01/17/07 16:02
Erwin Moller wrote:
> John Dunlop wrote:
>
>> Erwin Moller:
>>
>>> <script type="text/javascript">
>>
>> The MIME type registry marks text/javascript as
>> obsolete. Are there any browser issues with the MIME type
>> application/javascript?
>>
>> http://www.iana.org/assignments/media-types/text/
>>
>
> Hi John,
>
> Hmm, interesting.
> I'll ask that in comp.lang.javascript where they know a lot more of recent
> developments than I do.
>
> Regards,
> Erwin Moller
Hi John,
In case you don't read comp.lang.javascript, I received a few answers:
response1:
-------------------
My IE Mac run only text/javascript
My FF2 run with both
Didn't try with my other browsers
-------------------
response2:
---------------------------
> In comp.lang.php I advised somebody to skip using:
> <script language="javascript">
> and use:
> <script type="text/javascript">
That advice makes sense if you look at the HTML 4.01 or XHTML 1.0
specification where the type attribute on the script element is
mandatory while the language attribute is deprecated. So to have valid
HTML 4.01 or XHTML 1.0 markup you script elements need to have a type
attribute.
On the other hand that type attribute was introduced to allow
standarized MIME types as type names only text/javascript is used at
several places in the HTML 4.01 specification but was not a registered
MIME type when the HTML 4.01 specification was published and that status
remained that way for several years.
<http://www.rfc-editor.org/rfc/rfc4329.txt> changed that, so
text/javascript (and text/ecmascript which the SVG 1.0/1.1 specification
uses) are now officially registered MIME types but they have at the same
time been obsoleted in favor of application/javascript and
application/ecmascript.
--------------------------------------
So if you want to run on Mac IE, use text/javascript.
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|