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.
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?
7 solutions come to mind. In words similar to Fox News, “I report, you decide.”
- Ignore the problem and let your users click on the “compatibility view” button.
- Hope that your users have “compatibility view” enabled for all their websites.
- 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.
- Enable “compatibility view” for your website by using the following header with IIS or Apache:
- Use a meta tag on a page-by-page basis. Make sure the meta tag is directly after the HEAD tag.
Yes world, I see you!
- 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:
< ?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.