BrowserLab and User Agent Strings

When visiting a web site, your browser provides a number of details about your system and browser version to the web servers via a user agent string. This information can be used by the web site to, among other things, provide browser specific content to you. The user agent string generally looks something like this:

Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv1.9.2) Gecko/20100115 Firefox/3.6

See What is a User Agent for a more detailed look at the individual components of the user agent string.

User Agents in BrowserLab

Most browsers have a single user agent string that they send based on the browser version and operating system. Additionally, the general policy within the BrowserLab service is to run the browsers in their default install states so as to best match the median user’s installation. This means that BrowserLab screenshots for most browsers will report the standard user agent.

However, both Internet Explorer 8 and Internet Explorer 9 Beta include a ‘Compatibility View’ that will force the browser to report the Internet Explorer 7 user agent string and subsequently render the page as Internet Explorer 7 would.

Internet Explorer 7 user agent
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322)

While Compatibility View is, by default, off in Internet Explorer 8, it may be enabled by default when you install Internet Explorer 9 Beta. For BrowserLab screenshots we explicity force Compatibility View to be off in both of these browsers, ensuring that these browsers receive and render content meant for Internet Explorer 8 and 9 Beta. The user agent strings that these browsers then send are:

Internet Explorer 8 user agent (Native)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident 4.0; .NET CLR 1.1.4322)

Internet Exporer 9 Beta user agent (Native)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

Would support for Compatibility View in Internet Explorer 8/9 Beta be useful to you within BrowserLab or is the equivalent rendering provided by Internet Explorer 7 sufficient? Is there other functionality related to user agent handling that you would like to see in BrowserLab?

Related Resources

Matthew Johnson
Adobe BrowserLab Software Engineer

2 Responses to BrowserLab and User Agent Strings

  1. Michael Evangelista says:

    I’ve wondered if the compatibility view is really 100% the same as what the actual lesser-version browser would see natively. If so, I don’t think browserlab needs to worry about it, but if the rendering is any different, then I’d say yes, it could even be treated as a different browser in the list (e.g., IE7 native, IE7 as IE8 compatibility, IE8, etc)

    • matthewj says:

      At this time, we are not aware of any rendering differences between native IE7 and the compatibility mode in IE8 and IE9.

      There is a slight difference in the user agent strings with IE8 and IE9 including ‘Trident 4.0′ and ‘Trident 5.0′, respectively. If a web page is specifically sniffing for these to report and act on this information it might lead to some differences.

      That said, if there are no rendering differences between IE7 and the compatibility modes, there is likely little use for sniffing this part of the user agent.