Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.Net Change Browser Mode for IE10

In IE 10, if you check the developer tools, you can see that there are two modes for the browser:

  • Browser Mode
  • Document Mode

By adding the tag below:

<meta http-equiv="X-UA-Compatible" content="IE=9" />

One is able to force IE10 to render the page in IE9 document standards.

Is there a way that ASP.Net can force the browser to change the Browser Mode to use IE10 Compatibility View or any version lower?

I have an application that seems to break down with IE10, but trying the app in IE10 Compatibility and IE lower versions Browser mode, the application works perfectly fine.

Appreciate any help.

Update:

Posted screenshot of the browser mode and document mode.

If I added the meta tags above, I get:

browser mode screen shot

Notice that the Document Mode is in IE9 mode as specified in the meta tag.

But my application needs to change the Browser Mode (IE10) to something like IE10 Compatibility Mode or lower. Using the current IE10 mode, breaks the application.

like image 388
Angelo Avatar asked Mar 08 '13 18:03

Angelo


2 Answers

You can force the browser to use the most recent by:

<meta http-equiv="X-UA-Compatible" content="IE=EDGE" /> 

If you want to use lower versions, just change the number:

<meta http-equiv="X-UA-Compatible" content="IE=7" /> 

Will render for IE 7. But you see to know that from the example you posted. Not sure what else you are asking though.

like image 107
jason Avatar answered Sep 24 '22 23:09

jason


I have an application that seems to break down with IE10, but trying the app in IE10 Compatibility > and IE lower versions Browser mode, the application works perfectly fine.

I am having a similar issue with my app not behaving correctly on IE10. I discovered that my issue is related to the ASP.NET browser definition files not recognizing the latest IE:

[Source: http://support.microsoft.com/kb/2600100 ]

By default, ASP.NET uses sniffing technology for the user agent string to detect browsers. The browser definition files cover a certain range of browser versions. However, as the version numbers increase, ASP.NET might not recognize new versions of a browser by using the user agent string. In this case, ASP.NET might handle these versions as an unknown browser.

Links for the hotfixes:

.NET 2.0 SP and .NET 3.5 SP1: http://support.microsoft.com/kb/2600100

.NET 4.0: http://support.microsoft.com/kb/2600088

like image 20
ARP Avatar answered Sep 22 '22 23:09

ARP