The trouble is that only gives you a number, not if the compatibility is set.  if the number is 7 and the browser is 8, then you might be in IE8 compatibility mode, but you might also have it set to be IE7.  So it doesn't tell me that the user set the browser in compatibility mode.  If it is set to IE7 (or 8,9, etc.), then the page works, but if it is in IE8 compat, then it doesn't.