xhtml Script Tag in Internet Explorer
January 17th, 2005This one caused me a headache for a bit, trying to figure out what was wrong. Don’t use something like this in internet explorer…
<script type="text/javascript" src="script.js" />
For some reason, ie doesn’t understand the xhtml tag properly, and up goes your page in a puff of smoke - the source looks fine, and validates, but explorer renders a blank page. For xhtml compliance, just use:
<script type="text/javascript" src="script.js"></script>
…and it works fine.
