Getting your legacy site to look good in IE8

24 Jan 2010 Ferado

Internet Explorer 8 was released March 19, 2009 and what an exciting browser it was supposed to be. It was going to be faster, allow you to browse privately, it was going to be be XHTML compliant, and it was going to be more secure. All those fun things, right? Sadly, IE8 was faster, had a private mode, it was XHMTL compliant, and more secure than the older IE browsers.

The Problem

You must be wondering what the problem is right? Well, there wasn’t really a problem with the browser. There was a problem with your code, wasn’t there? You coded around IE6 & IE7 bugs. You made your site look lovely in those 2 browsers, and now that IE8 is out, your site looks broken again, doesn’t it?

What are you supposed to do about it?

The Solution(s)

7 solutions come to mind. In words similar to Fox News, “I report, you decide.”

  1. Ignore the problem and let your users click on the “compatibility view” button.
  2. Hope that your users have “compatibility view” enabled for all their websites.
  3. If you’re an IT Administrator, and this is an intranet site we’re talking about, then you can set “compatibility view” for all the computers in your network.
  4. Enable “compatibility view” for your website by using the following header with IIS or Apache:
    X-UA-Compatible: IE=EmulateIE7
  5. Use a meta tag on a page-by-page basis. Make sure the meta tag is directly after the HEAD tag.
    [cc lang=”html”]

    [cc lang=”html”]

    Hello World!

    Yes world, I see you!


  6. Fix your code with IE hacks by adding new JavaScript, HTML and/or CSS.
    [cc lang=”html”]

    With IE hacks you can embed HTML, CSS and JavaScript. Only IE reads the conditional. All other browsers treat it as an HTML comment.
  7. You can also add the header via your favorite programming language. I think it’s easier to add it through IIS or Apache, but if you want to do it on a page-by-page basis and you feel this is an easier way, by all means:

    Putting the IE8 compatibility in your PHP script:
    [cc lang=”php”]
    < ?php // PUT THIS WITH ALL YOUR OTHER HEADER CODE header('X-UA-Compatible: IE=EmulateIE7'); // ... the rest of your code [/cc]


Now you know what to do with IE8 and your legacy site. I’ve shown you 7 ways to make your site whole again. Of course these solutions are not limited to legacy sites. If you are in a jam and need to get your site working in IE8, these solutions with work for you too. Of course, the first 3 solutions should be ignored if you ever want to call yourself a professional.

2 comments on “Getting your legacy site to look good in IE8