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


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.