Javascript type and Internet Explorer

Here’s a fun little discovery. I was working on a web application for the iPhone and the javascript includes were declared as follows:

<script src="lib/jquery-1.3.2.min.js" type="application/x-javascript">
</script>

I wanted to test a more generic XML handling pattern so I loaded one of the test pages in IE. Unfortunatly Internet Explorer doesn’t understand the application/x-javascript and doesn’t execute the code. Not even IE8 knew what to do with this type. So just stick with text/javascript or text/ecmascript I suppose.

This entry was posted in Javascript. Bookmark the permalink.

Leave a Reply