Skip to content


Subversion checkout URL

You can clone with
Download ZIP


add IE8 "mode" detection #46

erichocean opened this Issue · 8 comments

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. :)


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.

@phistuck phistuck referenced this issue from a commit
PhistucK ie8 compat mode. ref #46 d9108ed
@patrickkettner patrickkettner referenced this issue from a commit in patrickkettner/Modernizr
@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
Something went wrong with that request. Please try again.