I have a visualforce page that is embedded in a page layout. I would like this page to force Internet Explorer to use "Browser Mode: IE10" and Document Mode: "Standards".

What I've done so far: Inside the controller, I've put the following code in the constructor:

ApexPages.currentPage().getHeaders().put('X-UA-Compatible', 'IE=10');

I've tested it and it's working nicely if I navigate directly to my visualforce page instead of viewing it from the page layout. The document mode is not set to IE10 if I view it from the page layout ( when it's embedded).

From my understanding, this property needs to be set before the page is rendered meaning that I can't set it from my vfpage as the "parent page" is already rendered.

Is there a way we can set IE to always use the latest browser mode ? Perhaps I can "inject" some javascript by using a custom home page component ?



  • This SE question suggests it's not possible, because you can't influence the rendering mode once the page has started loading, and the rendering mode is based on the outermost frame. I thought about posting an answer using a wrapper page, but it sounded hackish at best, and I'm fairly sure it would trivially break most of salesforce.com. – sfdcfox Dec 19 '13 at 17:12
  • Thanks for your quick reply sfdcfox. I'll ask our IT group if there's any script they can run to set IE settings for everyone. Perhaps there's something they can do there. Have a good day! – ChopaForce Dec 19 '13 at 17:15
  • If you can set up a network proxy, you could could ask the proxy to inject the header. That sounds particularly hackish as well, but it would work. Curious: why do you need to force IE 10 mode anyways? – sfdcfox Dec 19 '13 at 17:19
  • The visualforce page relies heavily on javascript / jquery. All our users have IE10 ( IE11 is breaking too much features). For some reasons, there's a few users who are running with a browser mode set to IE7 and this is causing issue in the page, preventing function to be ran. – ChopaForce Dec 19 '13 at 17:21
  • Try another approach: Have your IT group apply a registry entry to force their machines to always respect the setting: MSDN TechNet forum post, superuser – sfdcfox Dec 19 '13 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.