+ Start a Discussion
Eric BowdenEric Bowden 

IE compatibility mode demoted to IE 7 for Visualforce page in a layout

I have created a Visualforce page which uses the File API, available beginning with IE 10.  By default, my Visualforce pages render in IE 7 compatibility mode, and in case, the File API is not available.  I can force the Visualforce page to render in IE 10 compatibility mode by using the following code in my controller extension:
Apexpages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=10');

However, the Visualforce page ignores the X-UA-Compatible response header from the Visualforce page and continues to render in IE 7 compability mode when it is rendered as part of a layout page (presumably because it is iframed).  

I have considered adding a X-UA-Compatible metatag to the Visualforce page, but I cannot add the meta tag early enough in the <head>.  By default, the only option I have found for adding a meta tag adds it to the end of the <head>, after several scripts have been loaded, and I believe it is ignored.  Also, I'm not sure the meta tag would be honored even if I could add it early enough in the head (related discussion (http://stackoverflow.com/questions/18976213/main-web-page-in-standard-mode-iframe-in-compatibility-mode-any-issues)).

Has anyone else faced the issue of IE compability mode for a Visualforce page that is hosted in a page layout?  I need to be able to force compatibility mode of IE10 or greater.
Best Answer chosen by Eric Bowden
Eric BowdenEric Bowden
I took a closer look at my local configuration after reading this post (https://success.salesforce.com/ideaView?id=08730000000kpQwAAI) by Bryan Anderson.  He describes this issue and subsequently reports that the issue is resovled.

This issue occurs for me because IE 11 is configured to "Display intranet sites in Compatibility View" and salesforce.com/force.com is included as part of my local intranet zone.  My best guess is that it is an error to include salesforce.com/force.com in the local intranet zone, not sure yet.  Wanted to post this additional detail since it constrains the problem of my original post.