How To: Properly Reference A JavaScript File

Wow. After 2 hours of pain and suffering, I ran into my own daily WTF. I had some script contained within a .js file in my web. Like many times before, I created a reference to the script in the header. However, the script would only work in the Internet Explorer family and not in Firefox. After some aggrevation (and my Starbuck’s Pike Place Roast kicking in) I realized that the MIME type was set to text/jscript instead of text/javascript. I wish we can modify IntelliSense locally to get items added/removed as needed.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>