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:


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; 
} 

FIX: Sites not working in IE7, IE8 CO

Recently I had to fix a site that was not being displayed correctly in IE8. Turned out that some of the DOM was written by Javascript, and IE8 on client’s machine was not displaying parts of the page. At first i was not able to replicate the issue on a clean XP SP3, with IE8, but then after i disabled javascript i got the same effect as the client. Thought the solution was easy, assumed the client has JS disabled, but it turns out JS was enabled.

After closer investigation, the only difference between my IE8 and client’s IE8 was a CO, installed using IEAK8 (corporate shit) and it had by default native XMLHTTP disabled. Translated: jQuery was assuming the browser is IE6.

To fix this issue, enable XMLHTTP in IE7, or IE8

1. Open IE8
2. Go to Tools -> Internet Options -> Advanced
3. make sure "Enable native XMLHTTP support" is checked
4. Save