You Sniffers: Watchout for the new IE10 User-Agent

As announced at MIX last week, we’ve started shipping previews of IE10 (download) – just like we did through the IE9 alpha/beta stages. And this shows our continued focus on making IE a top browser choice for Windows users and IT shops. But, after reading Tony Ross’ post on the new IE10 user agent string, I wanted to forward along his post and emphasize a potential support issue.

Recently, my teammate Taylor Cowan found that one of our customer’s sites was incorrectly sniffing for the browser type and version. The code had a wrong RegEx string, which was yesterday’s problem. It also was checking for the IE version, looking for 1 digit – which is tomorrow’s problem. Someday, they’re going to think they found IE v1, when a IE10 user visits their site. That day is not that far off, with folks playing with platform previews and the release coming someday.

So, again, we recommend moving your code away from browser detection and towards “feature detection”. There are very few cases where sniffing is the mature coding practice, so start today enhancing your code.

Comments (4)

  1. Bored says:

    You wrote a blog entry full of weasel phrases trying to warn people of a two digit version number because SOMEONE didn't  write a correct RegEx? …  No wonder the reputation of IE drops everyday.

  2. Jon Box says:

    Dear Mr. Bored, this is just one example of the fragility of relying on browser sniffing. This post is about moving towards feature detection code. With all of the different features out there, it's a better way to go. Thanks for stopping by and reading my blog.

  3. R says:

    I'd say it is still TODAY'S problem. For years IE was one special browser which needed special treatment. CSS, event model, unsupported features, bugs with no fixes, different ways to achieve same things than on other browsers, … It's in developer's blood to check for IE and if it's not IE then for features. And while MS says "Oh, there are standards, dear developer, we are implementing them" we still have to support old versions though from developer's perspective they're crap. And as usual MS is chasing the "standards" train and not supporting it.

    For users it's a new version, but for developers it's one more headache because I'm sure there will be stuff different from other browsers.  

  4. Jon Box says:

    I agree that IE has caused migranes for developers over the years, and our previous versions create legacy baggage. Can't argue that at all. I agree that it's not what I want from a browser company.

    But, I think we've come a LOOOOONG ways in IE9. We in the field are pushing the IE engineering team, and I think they have truly responded to the feedback from customers. They hear it from us evangelists that are standing in front of you – because it's hard to face developers if we come with a bad product.

    From my viewpoint of working with the IE team, we are not trying to make a separate set of standards. If anything, I'd say we're more committed than any other browser company. Would love to see your examples of how we're acting badly in IE9 or IE10 (click on the email link and lets talk directly). I'd be glad to forward your examples and feedback, since they are working on IE10 now.

    I promise, these guys are committed to being responsible internet citizens. We really do want a one markup game for web developers, and we want to be the best browser on Windows for our consumers.

Skip to main content