treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Keep IE6 from running a .js file?

  • I don't want IE6 to run a particular piece of javascript, just because it's laggy and I don't want to worry about it. If the javascript is disabled, IE6 users can see the content just fine.

    My question is, is there any way to tell IE6 to NOT load a particular javascript file? I basically need the opposite of a conditional statement.
  • You can still use a conditional statement, it just has to be "If not IE6, then".

    I believe it looks something like this:
    <![if !(IE 6)]>
    <link rel=\"javascript\" your file />
    <![endif]>
  • But if it's commented out, wouldn't every other browser ignore it?

    EDIT: Nevermind, works like a charm. Thanks!
  • Yup, thats the "Everything BUT IE 6" runs this file