add IE8 "mode" detection #46

erichocean opened this Issue Jan 27, 2010 · 8 comments


None yet

3 participants

It would be great if Modernizr could tell us what mode IE8 was running in, so that we could tune our CSS on IE for speed when a not-so-fast engine was being used.

P.s. I know you know a little about this, since I learned about it from you in a wonderfully-comprhensive presentation you gave. Thanks!


i think its this:
isIE8Compat = !window.addEventListener && document.documentMode && document.documentMode == 7;

Can you give more information on what you're doing with this? Basically performance optimization based on assumption of a slower engine?

yep, just for performance. I want to use lighter CSS unless I'm on the fast IE8 engine.


Hmmm. we'll talk about it but not sure it'll make it in. we mostly like to focus on universal and spec'd features, rather than identifying bugs or what have you.

It'd make a lot of sense to do this after your script include:
return !window.addEventListener && document.documentMode && document.documentMode == 7;

I just tested it out and it works beautifully. :)

Sweet, I'll use that technique and add the necessary classes to the body tag. Thanks!



closed. :)

KuraFire commented Feb 3, 2010

This is the full test that I eventually got sorted out, and which Erich was looking for:

We should cross-test that solution with the one Paul listed above to see if the results match up. This could be important, and I think it might be worthwhile to add it to Modernizr directly, rather than as an addTest().


Closing in lieu of future Modernizr plans.

@paulirish paulirish added a commit that referenced this issue Jan 29, 2012
@paulirish paulirish ie8 compat mode. ref #46 7dcc268
@patrickkettner patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
@paulirish paulirish ie8 compat mode. ref #46 4d22730
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment