IE 11 - developer tools and detecting old IE browsers

html, internet-explorer, javascript, jquery

Solution

Conditional statements has been removed since IE10. But the developer tools of this version of IE still able to interprete them. Nevertheless, it isn't the case for the version of IE11. I don't know if it's possible to make back this feature. I guess no, anyway not for now I'm afraid. For me too, it's not logical. The emulation should support conditional statements. So, I think Microsoft will make a fix for that one day.

For the previous version of IE, you can install Windows 7 or use a WM. Make your own choice.

I confirm, that's right, you can use Modernizr to detect the browser.

Source : Conditional statements support by IE 11 and IE 10 Developer Tool Support conditional comments by IE

Problem

I'm using IE11 now, I thought it would be nice to have some additional tools for web developing. I was always using these tags to detect old crappy IE browsers: ``` <!--[if lt IE 7]><html class="ie ie6 some-custom-class"><![endif]--> <!--[if IE 7]><html class="ie ie7 some-custom-class"><![endif]--> <!--[if IE 8]><html class="ie ie8 some-custom-class"><![endif]--> <!--[if IE 9]><html class="ie ie9 some-custom-class"><![endif]--> <!--[if gt IE 9]><html class="ie some-custom-class"><![endif]--> <!--[if !IE]><!--><html class="some-custom-class"><!--<![endif]--> ``` I set IE11 to IE8-9 compatibility but it ignores the above tags. If there's no way to turn them ON then i don't understand why they made these tools -.-' Where is the logic ? Anyway do I need to install win 7 only for IE 8-9 ? http://www.browserstack.com < - I'd prefer client than remote access. Is there something like patch for this "modern" browser to make developer tools usable ? Or maybe there is another way to detect old browsers with a really lightweight script.

Original source

Related problems