LATEST NEWS&TIPS

Administrator | iShopDeveloper - Tuesday, July 07, 2009

Recently I finished a web site project which I had been working on for some time.  I tested it through out the project across all major browsers and platforms, which right now is quite an ordeal.  Having spent over two months absorbed with the one project I was keen to pass it over to the client and move on to the next job.  However the day before handing it over IE8 was released, I rarely pay too much attention to Beta versions, but couldn't ignore a big release like IE8.  I tested the site, but armed with the knowledge it rendered perfectly across all major current and legacy browsers, I didn't expect any nasty surprises... but it is Microsoft after all! My whole main menu broke which then displaced other key elements of the site.

My initial reaction was real anger.  So much of developers time is taken up pandering to the anomalies of IE and coming up with hacks to overcome it's shortcomings... and then they change the goal posts!! There was, as many of you may have noticed, a compatibility button, when selected and running in compatibility mode my site rendered fine, but unchecked it messed it up.  I thought this is ridiculous, the very presence of this button shows that Microsoft knows that IE8 is going to mis-render a large number of websites and they think that this is some kind of solution!!?

... Well in fact I take it all back.  What Microsoft has done is actually really good... and in the circumstances the best thing that they could have done.  The biggest gripe that developers have with older versions of IE is that they don't really observe standards.  So we can't really complain when with IE8 they try to resolve this.  They know by doing this many of the hacks that we've all done in the past to work around the inadequacies of IE may break.  Giving the user a button to click is a solution, but granted not amazing one, because it relies on the user understanding compatibility issues and pressing the button.

So what they also let you do as a developer, something which I don't know of in any other major browser, is effectively future proof your site.  Using a small piece of code placed in the <head> of your file you can get IE8 to emulate IE7 rendering.

You can do this on a page by page basis by adding <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> to the head of your file or you can use IIS or Apache to render all your site(s) as IE7.

IE8 constitutes a huge and much needed step forward for Microsoft and the compatibility mode is a good solution for a problem they would always have had to deal with at some point.  So lets not write off Microsoft yet, IE8 still has everything to play for in the browser wars.

Read more about IE8 Compatibility Mode here: IE Blog