Question

If a user is on IE 7 and I read

<% = Request.Browser.Version %>

I get 7.0

if they have IE 9 and are on compatibility view, I get the same thing.

Is there anything in Request.Browser that can differentiate between a real IE7 user and a user that is using IE8 or IE9 but in compatibility mode?

Was it helpful?

Solution

It would be better to do this on the client side using JavaScript. You can use something like this:

http://code.google.com/p/ie6-upgrade-warning/

You can tweak it to whatever you want.

If your goal is simply to make sure the user is not in compatibility mode, then you can use either the meta tag or http header version of X-UA-COMPATIBLE:

<html>
   <head>
       <meta http-equiv="X-UA-Compatible" content="IE=Edge" >
   </head>
   <body>
       <p>Content goes here.</p>
   </body>
</html> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top