Posted By

tobaco on 03/19/09


Tagged

http header ie7 compatibility IE8 emulate


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

lajevardi
pgmr
jitendraweb
silentbob84
j4yc33


Add http header to force IE8 to render in IE7 mode (PHP-Version)


 / Published in: PHP
 

include this snippet in your sites to force InternetExplorer 8 to display your site like InternetExplorer 7

In summary, IE7 compatibility support looks as follows:

IE=7

Display in IE7 Standards mode; Already supported in the IE8 Beta 1 release

IE=EmulateIE7

Display standards DOCTYPEs in IE7 Standards mode; Display quirks DOCTYPEs in Quirks mode; Available through the IE June Security Update for IE8 Beta 1

  1. if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {header("X-UA-Compatible: IE=7");}
  2.  
  3.  
  4. if (strpos($_SERVER['HTTP_USER_AGENT'],"MSIE 8")) {header("X-UA-Compatible: IE=EmulateIE7");}

Report this snippet  

You need to login to post a comment.