8Dec/110
Force IE to use the latest engine
If by some unknown reason IE8/9/10 are rendering your site in compatibility mode, ie IE7 mode or something lame like that, just force it to use the latest engine available:
<?php if (using_ie()) {header("X-UA-Compatible: IE=Edge"); ?><meta http-equiv="X-UA-Compatible" content="IE=Edge"/><?php } ?><!DOCTYPE html>
note that the code added right before the doctype declaration. the using_ie() boolean function below (credits to Simeon for this solution: http://www.php.net/manual/en/function.get-browser.php#101314)
function using_ie()
{
$u_agent = $_SERVER['HTTP_USER_AGENT'];
$ub = False;
if(preg_match('/MSIE/i',$u_agent))
{
$ub = True;
}
return $ub;
}