Thursday, 30 July 2009

IE8 and Backward Compatibility

So IE8 is here, and as much as we encourage our clients to get a proper browser and get Firefox, it seems we cannot ignore IE8! If you have got IE8 you may have noticed it comes with a button for "IE7 Compatibility Mode" which means it can switch back and render a Web site using the IE7 rendering engine rather than the IE8 engine - clearly Microsoft have made yet more changes to make life difficult for Web developers and generally break existing sites.

So has this just made more work for us to fix and tweak old sites?

Well here is a simple solution... by putting the following line:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
into the <head> section of your HTML in the site will automatically make IE8 render the site using the IE7 rendering engine - the result being you will not get any unexpected calls from clients who have *recently/boldly/foolishly [*delete as appropriate] upgraded to IE8!

Simple but effective!

No comments: