Untitled UI logotext
Solutions
WebsitesEcommerceMobile AppsWeb AppsProduction Support & Maintenance
Our work
Company
About usBlogPodcastContact us
Book a free consultation

JavaScript is Displaying instead of Running in IE9

Olivia Rhye

This was a really weird thing I ran across the other day while I was working on a site. It worked fine in IE8, IE7, Chrome, Safari, and Firefox. But in IE9, the entire JavaScript text was being displayed at the top of the page. The weird thing was that JavaScript was enabled, so it wasn't that. Then I tried adding a few different meta tags at the top, but those did not fix the issue.

It ended up being a conditional IE If statement like this:



So if you run into any issues with IE9 not running, but instead displaying JavaScript, try removing the conditional IE code or at least making it

<!--[if lt IE 8]>

instead.

Ready to start a project?

Book a free consultation
Untitled UI logotext
Our work
About us
Blog
Careers
Submit a ticket
Agency Partnerships
Contact
© 2024 fjorge. All rights reserved.
Privacy