Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't load a script in IE8 and below?

This question must be a duplicate, but I can't find the definitive answer on here.

How can I tell the browser not to load a script, if the browser is IE8 or below?

I know about targeting IE9 and above:

<!--[if gte IE 8]>
 According to the conditional comment this is IE 8 or higher<br />
<![endif]-->

but then the script does not load in non-IE browsers.

How can I say "load the script if not IE, or if IE and greater than IE8"?

like image 670
Richard Avatar asked Nov 29 '22 01:11

Richard


1 Answers

Conditional comment for 'Except IE8'?

<!--[if gte IE 9]><!-->
    // Your script here. This will only be loaded if IE version is greater than 8, OR any other browser.
<!--<![endif]-->

Should work?

like image 54
Abijeet Patro Avatar answered Dec 04 '22 06:12

Abijeet Patro