Jaa


A quick note on the Beta 2 Preview user agent string

The information published in this post is now out-of-date and one or more links are invalid.

—IEBlog Editor, 17 September 2012

At the end of April of last year, we blogged about the new Internet Explorer 7 User Agent string.  Since our original blog posting, we have also posted two new articles on this topic to MSDN: Understanding User-Agent Strings, and Best Practices for detecting the Internet Explorer version.

I’d like to provide a quick update to this topic for the Beta 2 preview version of IE7.

For the Beta 2 preview, we’ve removed the “b” from the user agent string.  We made this change early in order to help accommodate some sites which were mistakenly trying to cast the HTTPBrowserCapabilities.Version string property to a float. This cast throws an exception if the “b” is present in the string.  (For completeness, we’ve also updated the MSDN documentation for this property to help clarify that this property cannot be blindly cast to a number.)

With the removal of the “b”, most Internet sites are viewable in IE7, although there are a few sites which fail to recognize IE7 because they are performing exact string matches to look for specific IE version strings.  Those checks will need to be removed or updated to accommodate IE7.  The Best Practice document linked above provides suggestions.

If you need to be able to detect the IE7 beta version, you can still use conditional comments, because conditional comments do not evaluate the User-Agent header.  Instead, conditional comments are evaluated against IE’s Version Vector, which still contains the “b”. 

Hence, the following code will generate appropriate text, depending on whether or not the user is running a beta or final build:

          <!--[if IE 7.0b]>
<p>Conditional comments indicate that you are using a beta version of Internet Explorer 7.0.</p>
<![endif]-->

 

          <!--[if IE 7.0]>
<p>Conditional comments indicate that you are using the final version of Internet Explorer 7.0.</p>
<![endif]-->

You can use a simple User-Agent string test page to view your current user-agent string.  The page also provides simple registry scripts to override the user-agent string to help simulate different IE versions.

To summarize:

  • IE7 running on Windows Vista will send the following User-Agent header: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
  • IE7 running on Windows XP SP2 will send the following User-Agent header: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

Happy beta-testing!

 - Eric Lawrence

Comments

  • Anonymous
    February 03, 2006
    Mmmmmmmmmmmmmm

  • Anonymous
    February 03, 2006
    The comment has been removed

  • Anonymous
    February 03, 2006
    The comment has been removed

  • Anonymous
    February 03, 2006
    The comment has been removed

  • Anonymous
    February 03, 2006
    The comment has been removed

  • Anonymous
    February 03, 2006
    Is there anyway to get the user agent string from IE6 back into IE7 Beta 2 for webpage compatibility's sake until some webpage authors catch up to the IE7?

    For instance, my online tax prep site (TurboTax) does not allow me to complete my taxes online since I upgraded from IE6 to IE7 Beta 2.

    Thanks for any insights that can be provided for this.

  • Anonymous
    February 03, 2006
    treego,
    There is a link at teh end of the blog post http://www.fiddlertool.com/useragent.aspx that allows you to do exactly that.
    Thanks
    -Dave Massy [MSFT]

  • Anonymous
    February 03, 2006
    treego: You could use Fiddler (http://www.fiddlertool.com/fiddler/) and set up a script to replace the User-Agent header.

  • Anonymous
    February 03, 2006
    Ha ha ha that's funny!

    So, basically, MS can't release IE7 before tax time (april), because it will break SW with the IE engine embedded.

    If there was ever a good reason why the Browser should NOT be part of the OS, here is your answer.

    That is hilarious, and scares me, because I bet it isn't the only program.

    I guess I won't be installing the Beta any time soon then.

    Sorry to sound mean, but as I try hard to defend IE, I keep hitting these catch-22 situations where the Browser locks you in to a time period, or OS to maintain functionality.

    Oddly enough, installing any other browser, doesn't suffer from this issue.

    I like IE, but man, its hard to like the ugly duckling.

  • Anonymous
    February 03, 2006
    The comment has been removed

  • Anonymous
    February 03, 2006
    The comment has been removed

  • Anonymous
    February 03, 2006
    So, I need this extra program called Fiddler to Identify as IE6 when using IE7 Beta 2? Sorry, but this is a little hard for me to comprehend, it seems. Thanks for your help, again.

  • Anonymous
    February 03, 2006
    >When I visit the TurboTax site in Firefox v1.0.5

    Typo. Firefox v1.5.0.1 is what's sending me to the error page.

  • Anonymous
    February 03, 2006
    @treego: "So, I need this extra program called Fiddler to Identify as IE6 when using IE7 Beta 2"

    Nope. You have two choices:

    1> Use Fiddler to rewrite your web traffic. It works, but it's a sledgehammer.
    2> Simply run the .REG script provided at http://www.fiddlertool.com/useragent.aspx. This sets a registry key that overrides the user-agent that IE sends. No additional programs are needed.

  • Anonymous
    February 03, 2006
    »» Yes, I do, because I've tried it. You can write a simple rule using Fiddler to try out any string you'd like. You'll find a HUGE number of sites break when the UA string changes.

    And that is your explanation? Sorry, but this is ridiculous. When do you plan to drop the old useless browser-sniffing? Or are you happy with it?
    As I stated before, I can accept that my browser is not able to view any page because of its abilities, but I will not accept the same behaviour because I am using this browser.
    Please keep in mind that you are actually the only one who is able to initiate such a change because your software is the most used one.

  • Anonymous
    February 03, 2006
    treego,
    If you actually follow the link that we referred you to at http://www.fiddlertool.com/useragent.aspx then at the bottom of the page you will find links to registry keys that will change the UA string. No need to install an extra program at all. Although I do have to say that Fiddler rocks!
    Thanks
    -Dave

  • Anonymous
    February 03, 2006
    Is it possible to change the user agent string back to IE7 Beta 2 when I desire with a script, also, there? It seems that is what one of the options there says, but I'm not sure. Finally, will any upgrades of IE overwrite the UA string in the registry for me automaatically or do I have to manually keep up with that user agent string maintenance if I run a script now to change the user agent string?

    I think I'm done with my questions now. Thanks for the good and quick help.

    P.S. Turbotax works with Firefox 1.5.0.1 here, but I don't like Firefox much at all.

  • Anonymous
    February 03, 2006
    @EricLaw

    visiting TurboTax with: "Firefox v1.0.5"???

    Please tell me that was a typo. 1.5 has been out for quite some time now.

  • Anonymous
    February 03, 2006
    Uhm, TurboTax with Firefox 1.5x works just fine.

  • Anonymous
    February 03, 2006
    The comment has been removed

  • Anonymous
    February 03, 2006
    > Why keep that useless Mozilla/4.0, compatible, whatsoever?

    Historical reasons. Plus that's the only way to tell the different between Internet Explorer and old Netscape Navigator 4.x.

  • Anonymous
    February 03, 2006
    »» Why keep that useless Mozilla/4.0, compatible, whatsoever?
    »»
    »» Historical reasons.


    And what in particular should keep browser-developers from changing the way the ua-string is built up?

    »» Plus that's the only way to tell the different between Internet Explorer and old Netscape Navigator 4.x.

    And what has this to do with the coming version of IE, Firefox and so on? Old clients will still keep their ua-strings, but why should this prevent a new ua-string?

    I don't get your point.

  • Anonymous
    February 03, 2006
    Shouldn't it be WIE for Windows Internet Explorer? :)

  • Anonymous
    February 03, 2006
    Bogtha, read Eric's words again:

    "To be clear, it's not that webdevs are demanding that we "not break their fragile, buggy browser sniffing" so much as it is that users are demanding that IE7 be able to view their web pages."

    Think of the ordinary users. They install new IE 7, and suddenly a whole lot of web sites are messed up? That's not a good experience; MS will get blamed, and then people don't want to upgrade.

    Yes, there are many web developers who would jump on it and fix their sites. But many wouldn't, and that would have a negative effect on IE's end users.

    That said, I personally wouldn't mind seeing the UA get changed to MSIE/7.0 (...) but I can understand why the team doesn't want to make the change: it would have zero positive impact on the end user.

  • Anonymous
    February 03, 2006
    In support of PatriotB’s point above. The problem is that rightly or wrongly millions of websites expect to see the user agent string today in its current format, a format that goes back to the earliest browsers. I’m sure someone has some history on when exactly it first appeared. Many of those sites have minimal maintenance available for them and will not be readily updated to accept a new format UA string. If at release most websites do not work with IE7 then this will block adoption of the browser. It’s easy to say that those websites should be updated and it should be really easy for them to do so but we should remember that for many businesses that is an unacceptable cost that has been forced on them and may involve bringing in a consultant who charges them time by the hour. The change may not even be that simple if the system has not been well maintained and managed.
    Users who are not technically savvy such as some members of my family will install the new browser and say to themselves "it doesn't work" because many websites will appear broken. They will then uninstall the new version of the browser and tell their friends it doesn't work. It doesn't make any difference that it is the site's fault and not the browser, as far as the user is concerned IE7 is broken and they will refuse to install it.

    The ability to browse existing content without modification is essential to any browser if it is to gain adoption amongst the typical user or the user will consider it the fault of the new browser. From some perspectives they may be correct and it is simply the browser’s responsibility to render existing content.

    We really appreciate all the feedback on this preview release of beta 2 of IE7. The feedback helps us prioritise work so we can deliver a great final product.

    Thanks
    -Dave Massy [MSFT]

  • Anonymous
    February 03, 2006
    I do understand your point. If the IE7 really does understand additional webstandards I would be very happy to see it spread and replacing old versions.

    Sometimes it is like fighting windmills …

  • Anonymous
    February 03, 2006
    Well, I ran the script to Identify as IE6 while using IE7 Beta 2 and it now allows me to finish my taxes with TurboTax. That's nice, indeed.

    Now, if I want to go back to the default user agent string for IE7 Beta 2, how do I do that? Do I have to wait for the next update of IE7? Will the next update of IE7 override any of these registry modifications for the user agent string?

    Thank you.

  • Anonymous
    February 03, 2006
    I suggest that you give IE7 two UAs. The current one could be set as default. But, you could have the option for power users to switch to a more appropriate one, such as MSIE/7.0 or something. This would let developers prepare for the new UA, without breaking the net for everyone else. You could then drop the classic UA with IE8 or 9.

  • Anonymous
    February 03, 2006
    treego,
    To get back to the IE7 user agent string simply run the reg key at the bottom of the page at http://www.fiddlertool.com/useragent.aspx entitled "Internet Explorer 7 Beta 2 & RTM".

    Thanks
    -Dave

  • Anonymous
    February 03, 2006
    Thanks, Dave. That seemed logical, but I didn't know what the "RTM" meant.

  • Anonymous
    February 03, 2006
    The comment has been removed

  • Anonymous
    February 04, 2006
    -Dave Massy [MSFT]
    "It doesn't make any difference that it is the site's fault and not the browser, as far as the user is concerned IE7 is broken and they will refuse to install it. "

    Imagine if IE7 was not part of the OS and it could be installed right alongside IE6. Then grandma could switch back to the old browser, just for those broken sites, but still have the whizbang IE7 available for all those WEB 2.0 sites.

    Nah! Never mind, it's a stupid idea. Other browsers did that, and look how miserably they failed.

  • Anonymous
    February 04, 2006
    <i>Imagine if IE7 was not part of the OS and it could be installed right alongside IE6. Then grandma could switch back to the old browser, just for those broken sites, but still have the whizbang IE7 available for all those WEB 2.0 sites. </i>

    So you expect that:

    a) an entirely new side-by-side browser technology be developed, and
    b) "grandma" be expected to learn and understand how to use it

    all to solve an unnecessary versioning problem created by making aesthetic changes to a string whose format has been fixed for years and the end-user never, ever, ever sees?

    Are you people monkeys?

  • Anonymous
    February 04, 2006
    The comment has been removed

  • Anonymous
    February 04, 2006
    If you even took the opportunity to notice, IE7 is separated. In XPSP2, IE7 has no capability to read C: in the address bar. It forces the Windows shell to open up.... Wait, if it calls the Windows shell and it looks "webby", then that means they are trying to trick us! M$ still left the browser completely tied to the OS. What would be great is if the Vista team integrated a separate engine into Windows that allowed the weblike content of Windows Explorer to still function even without IE installed at all. And perhaps, Microsoft will provide a patch that replaces the Windows shell program of Windows 95, 98, ME, NT, 2000, and XP to work with this new internal engine.... Vista could have it already included. That would solve the problem of IE being so closely integrated into Windows Vista without sacrificing any functionality! WOW! I MUST BE BRILLIANT!!!

  • Anonymous
    February 04, 2006
    This is OK except Beta 2 Preview has a least one serious bugs (like multiple submissions of POST data...which has been reported elsewhere) that has cause us to actively disable IE 7.0 from accessing our website until it is fixed.

    That means that when this problem is fixed we need to have a new version number so that we can explicitly never allow people with Beta 2 preview to access our site. I am sure that may other sites will have the same issue.

  • Anonymous
    February 04, 2006
    The comment has been removed

  • Anonymous
    February 05, 2006
    I would like to request that future updates to IE7 increment the version number instead of adding additional tokens like "SV1" or "Q312461". It would have been much easier (for users and developers alike) to refer to "MSIE 6.2" instead of "MSIE 6.0 with XP Service Pack 2 installed."

  • Anonymous
    February 05, 2006
    PingBack from http://www.mengyan.org/blog/archives/2006/02/04/109.html

  • Anonymous
    February 06, 2006
    What about something like:
    MSIE/7.0 (compatible; MSIE 7.0; Windows NT 6.0)

    Thats a step on the way to being logical, but shouldn't break too much browser sniffing (absolutly no reason I can see for them looking for Mozilla/4.0)

  • Anonymous
    February 06, 2006
    The comment has been removed

  • Anonymous
    February 06, 2006
    > Besides its really a shame to call your
    > browser with the name mozilla, because yours
    > isn't anywhere close.

    Has absolutely nothing to do with the Mozilla browser.  The Mozilla prefix became standard part of the UserAgent string back when Netscape Navigator was the dominant browser, and people coded Javascript expecting the UserAgent to start with Mozilla/versionnumber.

  • Anonymous
    February 10, 2006
    vqf

  • Anonymous
    February 11, 2006
    The comment has been removed

  • Anonymous
    May 22, 2006
    IE7/RSS Platform - User-agent 文字列

  • Anonymous
    May 26, 2006
    With the release of Windows Vista Beta 2, I want to announce that we will be naming the version of IE7...

  • Anonymous
    May 27, 2006
    PingBack from http://www.darrenstraight.com/blog/2006/05/27/announcing-internet-explorer-7/

  • Anonymous
    June 07, 2006
    PingBack from http://www.bluesparc.com/2006/06/05/announcing-ie7-the-second-flavor-of-the-new-ie-you-already-know-love/

  • Anonymous
    June 19, 2007
    IE7/RSS Platform - User-agent 文字列

  • Anonymous
    February 20, 2008
    PingBack from http://gufo.wordpress.com/2007/02/12/utilizzare-luser-agent-di-ie7-su-firefox/

  • Anonymous
    May 29, 2009
    PingBack from http://paidsurveyshub.info/story.php?title=ieblog-a-quick-note-on-the-beta-2-preview-user-agent-string

  • Anonymous
    May 31, 2009
    PingBack from http://woodtvstand.info/story.php?id=4394