User Agent Strings and Browser Testing

User Agent Strings and Browser Testing

I just discovered the reason why my notebook computer isn’t playing nice with certain ASP applications: I had apparently, in a fit of moral outrage over how Internet Explorer pretends to be Mozilla in its user agent string, changed that string to something else.

A little background: The user-agent string is a bit of info that your browser sends back to a webserver to identify its “model”. Since every browser is a little different, web pages are sometimes coded to detect which “make and model” is being used, adjusting what is displayed accordingly. Internet Explorer did this to be compatible with then-king of the hill Netscape Navigator. After Navigator was firmly crushed, IE continued to masquerade itself using the Mozilla monicker, a grisly trophy of the Great Browser War. The doppleganger prevailed, assuming the identity of the original!

That just didn’t seem right, so I changed the name of the browser from “Mozilla/4.0” to “IE6” in the user-agent string using some arcane methodology I have since forgotten. Another injustice righted! Another ghost laid to rest!

But then the haunting began…

The ASP application in question is Showing Evidence, a web application I developed with the guys at [Inquirium][inq]. We did the Flash part, and Intel’s web team built all the ASP and back-end infrastructure to support it. However, the demo breaks on my notebook, but works on my desktop. And both machines are running the same version of XP and IE6, right down to the service pack. Argh!

But this morning, I was contemplating the difficulties I had submitting this blog to the 9rules network due to some browser issue, and it came to me: duh, Intel’s browser detection code might be getting a different user-agent string from one of the computers. So I checked, and It Was As I Thought.

I changed the string back using the registry-editing instructions at the bottom of Eric Giguere’s tool page, and now everything works.

So that’s the story of how a long-forgotten act of zealotry came back to bite me on the ass. The moral? Um…I’ll get back to you on that.

2 Comments

  1. Mathias Bynens 14 years ago

    The moral? IE is teh sux0r.

    Web-Sniffer.net is a much cooler HTTP header viewer IMHO. Go check it out.
    ——-

  2. Dave 14 years ago

    Heh…that’s why I’m using FireFox for my general web browsing :-)

    Thanks for the Web-Sniffer.net link…very cool! I could have used that a couple of months ago.