How to determine the correct browser version when compatibility mode is enabled

I need to determine which version of the browser the user is using, however compatibility mode is enabled by default for the entire company.

Server side script, how to determine the real version of the browser?

thanks

Update I have a page showing the version of IE using document.documentMode, however I cannot figure out how to pass this to the server side so that I can use it.

+6
source share
4 answers

document.documentMode in javascript was the solution.

<script> alert(document.documentMode); <script> 
+2
source

Request.Browser will provide you with complete information about the browser, where you can check the version, browser name, browser type, etc.

 Request.Browser.Version // Return complete browser version infor Request.Browser.Browser // If browser is IE then it will return **IE** 
+4
source

Instead of struggling with compatibility mode, you can disable it for your specific web application. We do this on all of our sites because the compatibility mode really does a lot of twisting.

disable IE compatibility mode using tags

0
source

Use HttpContext.Current.Request.UserAgent on the server, if on the client, then the navigator.userAgent user and then the instructions below ie7 do not have the trident keyword, ie8 - trident / 4, and IE5 - trident / 5.

First find MSIE xx, if xx is 7, then find Trident / yy. If there is no trident, then IE7, if yy is 4, then its IE8 and if yy is 5, then ie9 and if yy is 6, then ie10

http://blogs.msdn.com/b/ie/archive/2010/03/23/introducing-ie9-s-user-agent-string.aspx

0
source

Source: https://habr.com/ru/post/892966/


All Articles