IE9 – Force Compatibility Mode View
So I’ve been working with my partners on a website now for it seems like months – oh wait – it HAS been months LOL. We put the final push on it yesterday as far as formatting/layouts, some of the content areas, etc. All was good – until we boosted up our number of social media mashup items to more than 3. We use WordPress and there’s a lot of functionality that is rather canned – that’s the beauty of WordPress. However, it can also be an issue. For example, when something in the code that you DIDN’T write seems to go awry or have a compatibility issue with some other code. And that’s exactly what happened last night.
We worked everything out in Firefox (and had viewed it in IE8 with no issues), until we boosted our Social Media Mashup plugin items to 5. And then the page broke in IE 9. Pinned it down to specifically post #4. Swapped out for another feed and it still broke. Tried a few other feeds and the reproducible error was always item #4 – and no amount of formatting seemed to straighten it out. Unfortunately, I was pretty well nested down in the divs and just couldn’t seem to get it out of there. But it did not break in IE 8 (amazingly).
Just don’t have time to go through – having already wasted 4 hours on figuring out what might be the problem – and recode anything.
IE 9 Compatibility Mode View to the rescue
There are some methods using header tags in the actual pages, but really did NOT want to go that direction – needed something a little more “one size fits all” and ran across this particular bit of .htaccess code
Add following to your web.config:
Add this to .htaccess file:
BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=8 env=best-standards-support
Worked beautiful – thanks to Reza Qorbani at http://qorbani.com. This solved my compatibility issue and allowed us to move on with our finishing of the website. We’ll go back later and take a run at some of that code that might be causing the underlying issue – but this is a foolproof/goofproof way to force those IE 9 browsers into compatibility mode. Make sure to close/reopen your browser to force IE to pickup the new header data!
And look for a new about-to-be announced mega-site on Monday!