Javascript short tags – don’t do it.

Yeah, so I just spent about an hour trying to figure out why javascript had stopped working.

<script src="blah.js" type="text/javascript" />

will cause some very strange things to happen. You *must* have a closing tag.

<script src="blah.js" type="text/javascript"></script>

2 thoughts on “Javascript short tags – don’t do it.

  1. No, it’s in the spec and has been for about a decade. The reason why are pretty obvious.

Leave a Reply

Your email address will not be published. Required fields are marked *