Question : Setting Compatibility Mode in IE8 using JavaScript

We have a website that displays Facebook Like Box social widgets. They were working fine until yesterday when the stream stopped loading in IE8 on Windows 7 machines. We determined that clicking on the broken page icon to put the browser into Compatibility Mode allows the stream in the Like Box social widget to load properly.

While waiting for Facebook to address this issue, we reviewed http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx. We tried putting the appropriate meta tag into our page to define the Document Compatibility Mode, assuming that this meta tag would be equivalent to clicking the broken page icon.  It is not. Although the broken page icon disappeared from the browser indicating that the meta tag was being processed by the browser, the stream portion of the Like Box social widget still did not load.

Clearly, defining the Document Compatibility Mode using a meta tag is not equivalent to clicking on the broken page icon to put the browser into Compatibility Mode. Namely, clicking on the broken page icon to put the browser into Compatibility Mode actually changes the HTTP_USER_Agent that the browser reports. This impacts all the content (including pages in iframes) because any user agent check will see a version number of 7, not 8. However, the impact of the meta tag is quite different from clicking on the broken page icon and does not appear to cascade from a parent page into an iframe. Since Facebook generates their own iframe to hold the Like Box, there is no way for us put in a meta tag and force IE8 to render the Facebook page in Compatibility Mode.

What I would like to achieve is finding a way to put script into my page that will, in effect, mimic clicking on the broken page icon and put the browser in Compatibility Mode for them. I know there is JavaScript that can set your home page, but is there a way to use JavaScript to activate the broken page icon to put the browser into true Compatibility Mode?

Answer : Setting Compatibility Mode in IE8 using JavaScript

It turns out that Compatability Mode causes issues with Facebook's Recent Activity Widget, so it really is not a viable option for us as we use both Recent Activity widgets and Like Boxes on the same page. In addition, Facebook appears to be making progress in addressing the issue with the Like Box. Based on the fact that after several days the only offerred solution does not address our actual request, I have to assume that there is no way to dynamicaly activate the Compatability Mode button.
Random Solutions  
 
programming4us programming4us