javascriptinternet-explorerconditional-comments

How not to load a script in IE?


It's possible to load a script only in IE with conditional comments

<!--[if lte IE 7]>
    <script type="text/javascript" src="somescript.js"></script>
<![endif]-->

but what if I don't want to load it in IE lte 7 (but still need it in all other browsers)?

Any simple solutions?

P.S. I have a problem with SyntaxHighlighter - too many code slows IE7 down and since I'm short of time, I decided just to turn it off in IE7 for now.


Solution

  • This post says you can use the ! (NOT) operator like [if !IE]