Kunok Kunok - 1 year ago 70
HTML Question

If IE tag not working as expected

I have this HTML

internet_explorer = false;
<!--[if IE]>
<script type="text/javascript">
internet_explorer = true;

and this JS:


When I run this on all browsers it should be false and it is. However, it is supposed to be true on Internet Explorer but it's false. What do I do wrong?

Answer Source

Conditional comments are no longer supported

Support for conditional comments has been removed in Internet Explorer 10 standards and quirks modes for improved interoperability and compliance with HTML5.

Source: https://msdn.microsoft.com/en-us/library/hh801214(v=vs.85).aspx

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download