Why is Chrome ignoring IE conditional tag? Why is Chrome ignoring IE conditional tag? wordpress wordpress

Why is Chrome ignoring IE conditional tag?


--> ends a comment. So, the end of this comment:

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->

is also the end of the part that is a comment to the Chrome rendering engine.

The solution is easy: just move your comment tags outside of the IE conditional.

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --><!-- WARNING: Respond.js doesn't work if you view the page via file:// --><!--[if lt IE 9]><script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script><script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script><script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script><![endif]-->