IE7 User Agent String

Ever since the release of the new layout on SoccerProject, some IE7-users had been reporting the same bug. The advertising banner at the bottom of the screen was not moving when they tried to scroll (up nor down). Very annoying because sometimes very crucial functionality was hidden by the banner. Because the bug only appeared with some users and it was not reproducable by me, I never had a clue about the cause. None of my questions about this bug were decently answered, so it seemed like this puzzle would never be solved. Very discouraging, but that’s what IE7 is known for, isn’t πŸ˜‰

Until recently manager JNV reported the problem again. He found out himself that his IE7 browser was identifying itself as IE6 by using the User Agent String

[Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)]

Changing this in the registry solved his problem. He even provided me the code for two .reg-files which I could use for testing.

Allthough I was very glad to know the cause and to even have a solution, this was not going to solve the problem for all those users who never make it to the forum, so I needed to keep looking for a solution. Obviously this was a lot easier now I knew how to reproduce the problem, by simply double-clicking the correct reg-file.

In the process I learnt that it’s very easy to your own User Agent string by filling in


in the address bar of your browser. It turned out that my IE7-browser had this User Agent String:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; formsPlayer 1.4; Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

Or after clicking the other reg-file :

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; formsPlayer 1.4; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

I expected the strings to be different, but I never expected it to be double. I mean the string “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; formsPlayer 1.4;” is simply repeated. Only in the second case it’s with a small change, IE 6 instead of IE 7. In fact this opened up the possibility to a solution, because now I could still check if the browser was IE7, although it also identified itself as being IE6. That would never have been possible if the User agent string wasn’t repeated. I’m not sure this is how MS meant it to be used, but at least it has worked for us.

Of course, if the user Agent is simply “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ;” We will never be able to display everything correctly, because the client identfies itself different from how he renders the page, but that should never be the case, unless a user explicitly wants this.

Explore posts in the same categories: Development


You can comment below, or link to this permanent URL from your own site.

6 Comments on “IE7 User Agent String”

  1. keyelpk Says:

    that’s why i use opera… and i’m lucky to have spfa…

  2. Isis Says:

    Up to now I considered myself equally intelligent as Sjarel. But I have to admit I don’t understand sh*t about what he is saying here. So I think there might be a possibility that he is smarter than I am. (Only in computing of course) πŸ˜›

  3. sjarel Says:

    Or maybe I’m just terrible in explaining stuff ….

  4. keyelpk Says:

    sorry, Sjarel, in explainig badly i’m king. i know what i want, just don’t ask me to explane.

    what sjarel sad about the browsers is that some ie’s ‘name card’ was showing wrong info. like for me to say ‘hi, i’m ie6’, but actualy i’m ie7 πŸ˜‰

  5. timheuer Says:

    were you ever able to figure out what changed the user agent string to include the IE6 identifier? i’m having that same problem now as well and trying to track down who changed the user agent string?!

  6. sjarel Says:

    According to the user, it changed after installing a certain program, don’t know which though.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: