Making Firefox and Javascript play nice together
DATE
16 May 2010
![]()
A word to the wise; when including an external javascript file on an HTML page, always terminate your script tag with a closing script tag, not an inline closing slash.
I ran into an issue where Firefox does not recognize that the script tag is closed and therefore does not render the remainder of your HTML code. This is quite confusing when you specify your JavaScript include in the Head tag and end up with a completely plank render page in Firefox.
Simply put, for Firefox compatibility use this:
<script type=”text/javascript” src=”/js/externalFile.js”></script>
Not this:
<script type=”text/javascript” src=”/js/externalFile.js” />