0

I'm coding using a software that has an embeded browser (It's a kind of IDE with browser-preview, I code using the tools provided by this software). The fact is that the version of MSIE used by the software is different from the one installed on the computer.

How is it possible? Window's softwares don't use the same version installed on Windows? How can they embed a different version of the MSIE browser?

I have not specific informations about the language used for the software, mine is a generic question about ways to embed a different version of MSIE in softwares.

Fez Vrasta
  • 14,110
  • 21
  • 98
  • 160
  • Did you create or have access to the source code for this software? How do you know it's using the IE engine? – Fishcake Sep 09 '13 at 13:55
  • No I've not access to the code, I know uses the IE engine because the error page is the same of IE and the way it renders CSS is the same of IE7, but on my PC I've IE10 installed. – Fez Vrasta Sep 09 '13 at 13:56
  • 2
    Check if the WebBrowser control is running in compatibility mode. – Chris O Sep 09 '13 at 13:57
  • I can run in it only web pages (no access to browser settings), how can I check it? – Fez Vrasta Sep 09 '13 at 13:58
  • 4
    See this answer for how to change rendering mode: http://stackoverflow.com/a/5357168/108847 – Fishcake Sep 09 '13 at 13:59
  • 1
    You can spot the HTTP User Agent with _ngrep for windows_ or surfing on a prepared site. – Daniel W. Sep 09 '13 at 14:06
  • I'll give them a try when I'm on that PC (1h), I may also try `typeof window.performance!='undefined'` I guess. – Fez Vrasta Sep 09 '13 at 14:07
  • 1
    Thanks @Fishcake Ah that's the link I was looking for, `FEATURE_BROWSER_EMULATION` is the search term, also applies to systems with IE10 installed. See the MSDN [Browser Emulation section](http://msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation), and notice that `contoso.exe` is just the app name, you supply each app name that will use these compatibility view settings. – Chris O Sep 09 '13 at 14:08
  • or `alert(navigator.userAgent)` – Daniel W. Sep 09 '13 at 14:08
  • Ok was in compat mode, I've forced the Edge mode with an header in PHP and now it works as IE10. – Fez Vrasta Sep 11 '13 at 06:40

1 Answers1

1

To check if it was in compat-mode I've tried detecting the user agent, and it was talking about Trident: 6.0, this version of Trident is only in IE10, so the browser was IE10.

To force the page to rendere in the IE10 way I've added this header:

<?php header("X-UA-Compatible: IE=edge,chrome=1"); ?>
Fez Vrasta
  • 14,110
  • 21
  • 98
  • 160