Many Web designers use browser detection techniques to ensure that their sites display properly when viewed with specific browsers. Some browser detection techniques encounter problems when viewed with later versions of the browser they’re made for. Internet Explorer has the User Agent String which is the identifier that provides data about its version and other attributes to Web servers. Many Websites and applications rely on the User Agent String to detect the Browser settings.
Now the issue is that, web pages that explicitly check the User Agent String and do not support the Internet Explorer 8 User Agent String may not run properly. Applications that host Trident will default to Internet Explorer 7 using the Web Optional Component, but will not have access to Internet Explorer 8 features.
A simple Mitigation to this issue would be to ensure that your web applications properly handle the new ‘MSIE 8.0’ version in the User Agent String. see below for example:
Without compatibility mode:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
With compatibility mode:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Also, use Internet Explorer 7 Compatibility View for those applications based on Internet Explorer 7. This can be done either by clicking on the Compatiblity view button or by using meta tags.
See below for meta tag examples.
<html> <head> <!-- Mimic Internet Explorer 7 --> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>My Web Page</title> </head> <body> <p>Content goes here.</p> </body> </html>
IIS Compatibilty mode
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <clear /> <add name="X-UA-Compatible" value="IE=EmulateIE7" /> </customHeaders> </httpProtocol> </system.webServer> </configuration>
A best practice to detect IE more effectively, is to detect features and not the browser Version details using the “User Agent String”. You will find this MSDN article handy, when you wanna know a way to detect IE effectively – Here
The Complete Application Compatibility Series